Problem using console.profile

22 views
Skip to first unread message

john6630

unread,
Jul 3, 2008, 11:02:08 PM7/3/08
to Firebug
I am a newbie and am very excited about Firebug but find the
documentation a bit sparse. What I am trying to do is profile one of
my javascript functions. Here is what I tried -

function ToggleNewsItems(){
// alert(newsToggle);
console.profile("My Toggle Profile");
if (newsToggle == 1) {
document.getElementById("NewsItem1").style.display = 'none';
newsToggle = 0;
}
else
{
document.getElementById("NewsItem1").style.display = 'inline';
newsToggle = 1;
}
console.profileEnd();
}

The function is called by the following:

<a href="javascript:ToggleNewsItems()">Toggle News Items</a>

I am running Firefox 2.0.0.15 and the latest Firebug (I do not see
where to get the version number but my plug ins auto update when
Firefox starts) I am running the page out of Dreamweaver CS3

When I load the page and start Firefox and click on the hyperlink, I
get "No Activity To Report".
If I clear the console, click on the Profile tab the standard profile
starts.When I click on the hiperlink, it then starts my profile with
the title "My Toggle Profile" but it keeps running until I click on
the profile tab. Then "My Tag Profile" stops and gives the following
report

My Toggle Profile (0ms, 1 calls)
Function
ToggleNewsItems 1 NaN% 0ms 0ms 0ms 0ms 0ms index.html (line 1

but the standard profile keeps running.

I am confused. Am I not using console.profile correctly? Any help
greatly appreciated.

And a very big THANK YOU to the developer(s) of this great tool!!

John Lee

John J Barton

unread,
Jul 4, 2008, 1:20:32 AM7/4/08
to Firebug
Which version ? Firefox->Tools->Addons->Firebug

John CA

unread,
Jul 4, 2008, 10:35:22 AM7/4/08
to fir...@googlegroups.com
Firebug version is 1.05 and Firefox 2.0.0.15

> Date: Thu, 3 Jul 2008 22:20:32 -0700
> Subject: Re: Problem using console.profile
> From: johnj...@johnjbarton.com
> To: fir...@googlegroups.com

John J Barton

unread,
Jul 4, 2008, 12:03:56 PM7/4/08
to Firebug
I can help if you want to install Firebug 1.2 from
addons.mozilla.org.

On Jul 4, 7:35 am, John CA <john6...@hotmail.com> wrote:
> Firebug version is 1.05 and Firefox 2.0.0.15
>
> > Date: Thu, 3 Jul 2008 22:20:32 -0700
> > Subject: Re: Problem using console.profile
> > From: johnjbar...@johnjbarton.com

John CA

unread,
Jul 4, 2008, 4:37:33 PM7/4/08
to fir...@googlegroups.com
Hi John,
I believe Firebug 1.2 will require me to upgrade to Firefox 3? I have seen several posts about problems using Firefox 3, so I will wait a little longer. I just wanted to know if I was using the console.profile properly. I did not think that would be version dependent.

Thanks,
John Lee

> Date: Fri, 4 Jul 2008 09:03:56 -0700

> Subject: Re: Problem using console.profile

John J Barton

unread,
Jul 5, 2008, 11:43:43 AM7/5/08
to Firebug
Firebug 1.2 works in Firefox 2. (BTW Firefox 2 has many more problems
that Firefox 3; the QA on FF3 is awesome for a .0 release).

The proper use of console.profile is not version dependent. But the
implementation of console.profile was completely rewritten for Firebug
1.2.

Well there is one exception: For Firefox 2, you have to issue
loadFirebugConsole() before using the console in Firefox 2.

John.

On Jul 4, 1:37 pm, John CA <john6...@hotmail.com> wrote:
> Hi John,
> I believe Firebug 1.2 will require me to upgrade to Firefox 3? I have seen several posts about problems using Firefox 3, so I will wait a little longer. I just wanted to know if I was using the console.profile properly. I did not think that would be version dependent.
>
> Thanks,
> John Lee
>
> > Date: Fri, 4 Jul 2008 09:03:56 -0700
> > Subject: Re: Problem using console.profile
> > From: johnjbar...@johnjbarton.com
Reply all
Reply to author
Forward
0 new messages