New extension for firebug.

77 views
Skip to first unread message

Anthony Maia

unread,
May 2, 2012, 6:05:31 AM5/2/12
to fir...@googlegroups.com
Hi,

I'm a searcher student working on workarounds. I want to add a button to firebug which retrieve a few line around a breakpoint.
Then expose some possible workarounds to the developer.

I take the extension consoleexport as exemple. 

But here is my problem. How to know the line of a breakpoint?

Thank's!

Regards.

Anthony Maia
 

Jan Honza Odvarko

unread,
May 2, 2012, 7:46:11 AM5/2/12
to Firebug
On May 2, 12:05 pm, Anthony Maia <anthony.mai...@gmail.com> wrote:
> Hi,
>
> I'm a searcher student working on workarounds. I want to add a button to
> firebug which retrieve a few line around a breakpoint.
> Then expose some possible workarounds to the developer.
Where exactly the button should be available?

> I take the extension consoleexport as exemple.
>
> But here is my problem. How to know the line of a breakpoint?
Check the "breakpoints" panel to see how to get a list of breakpoints.
https://github.com/firebug/firebug/blob/master/extension/content/firebug/js/breakpoint.js#L347

The logic is based on FBS.enumerateBreakpoints, which also provides
url and line for a breakpoint

This line shows how to get the source line for the breakpoint:
https://github.com/firebug/firebug/blob/master/extension/content/firebug/js/breakpoint.js#L479

You can use the same to get surrounding lines...

HTH

Honza

Anthony Maia

unread,
May 2, 2012, 8:32:40 AM5/2/12
to fir...@googlegroups.com

Thank's for the quick answer.
The button is available in the script panel.
I'll look to the link you send me now.

Jan Honza Odvarko

unread,
May 2, 2012, 9:37:51 AM5/2/12
to Firebug
On May 2, 2:32 pm, Anthony Maia <anthony.mai...@gmail.com> wrote:
> Thank's for the quick answer.
> The button is available in the script panel.
> I'll look to the link you send me now.
Great. Do not hesitate to recommend any Firebug API improvements
that would make extension development easier.
Honza

Anthony Maia

unread,
May 2, 2012, 9:48:21 AM5/2/12
to fir...@googlegroups.com
I already try to use FBS.enumerateBreakpoints but I don't know how to use it. 
I have an error which tells that FBS is not definied.
May you show me an example on how to use it, please?

Thank's.

Jan Honza Odvarko

unread,
May 2, 2012, 9:55:23 AM5/2/12
to Firebug


On May 2, 3:48 pm, Anthony Maia <anthony.mai...@gmail.com> wrote:
> I already try to use FBS.enumerateBreakpoints but I don't know how to use
> it.
> I have an error which tells that FBS is not definied.
> May you show me an example on how to use it, please?
Take a look at this code
https://github.com/firebug/firebug/blob/master/extension/content/firebug/console/memoryProfiler.js#L14

It's including "firebug/js/fbs" module

You need to support AMD syntax in your extension
http://www.softwareishard.com/blog/firebug-tutorial/extending-firebug-hello-amd-part-xii/


Honza

Anthony Maia

unread,
May 4, 2012, 4:15:28 AM5/4/12
to fir...@googlegroups.com
Hi

Thank's for your help, with the samples of AMD extensions, I re-design my extension and I can now retrieve the line of a breakpoint.
I have an other question, how do you refresh your extension without reboot the browser? I can't find how to do it.

Thank's.

Anthony. 

Jan Honza Odvarko

unread,
May 4, 2012, 6:03:55 AM5/4/12
to Firebug
On May 4, 10:15 am, Anthony Maia <anthony.mai...@gmail.com> wrote:
> Hi
>
> Thank's for your help, with the samples of AMD extensions, I re-design my
> extension and I can now retrieve the line of a breakpoint.
> I have an other question, how do you refresh your extension without reboot
> the browser? I can't find how to do it.
I am restarting the browser.

But this is actually a good question. Since Firebug is supporting
restart-less
installation (even for extensions), somebody could come up with a
solution that
allows uninstall and install Firebug/extension in one step - i.e.
reload.
So, browser restart wouldn't be necessary.

This would be excellent!

Honza
Message has been deleted

Anthony Maia

unread,
Jun 14, 2012, 12:58:53 PM6/14/12
to fir...@googlegroups.com
Hi,

I try to call java in the firebug extension and I should modify the variable document but it's not alike that usual. How is it build?

Thanks.

Jan Honza Odvarko

unread,
Jun 15, 2012, 2:07:05 AM6/15/12
to Firebug
On Jun 14, 6:58 pm, Anthony Maia <anthony.mai...@gmail.com> wrote:
> Hi,
>
> I try to call java in the firebug extension and I should modify the
> variable document but it's not alike that usual. How is it build?
There used to be support for Java in Firefox extensions (see here
https://developer.mozilla.org/en/Java_in_Firefox_Extensions)
but it's not supported anymore.

Honza

Sebastian Zartner

unread,
Jun 15, 2012, 4:08:15 AM6/15/12
to fir...@googlegroups.com
but it's not supported anymore.
When was that changed? My extension RExT uses Java to interpret regular expressions and it is still working using Firefox 13.0.
Though in Firefox 16.0a1 it is indeed not working anymore.

Sebastian

Anthony Maia

unread,
Jun 15, 2012, 4:48:19 AM6/15/12
to fir...@googlegroups.com
Thanks, it's a good solution but I should install the firefox 3.6 release and the firebug extension with AMD are not compatible with it. 
Why a so good support for Java in Firefox extensions is not supported anymore... It's a shame. 

Anthony Maia

unread,
Jun 15, 2012, 4:58:32 AM6/15/12
to fir...@googlegroups.com
I have this error when I try to launch the extensions with the javaFirefoxExtensionUtils:
Components.classes["@mozilla.org/extensions/manager;1"] is undefiened 

And with a search everybody says that's a compatibility problem.

May you show me how did you call java method in your extensions, please.

Thanks.
Anthony.

Anthony Maia

unread,
Jun 15, 2012, 5:03:38 AM6/15/12
to fir...@googlegroups.com
I install your extensions and see that you don't call Java in Javascript but you call just your jar and I really need the javascript part.

Jan Honza Odvarko

unread,
Jun 15, 2012, 5:50:48 AM6/15/12
to Firebug
On Jun 15, 10:08 am, Sebastian Zartner
<sebastianzart...@googlemail.com> wrote:
> > but it's not supported anymore.
>
> When was that changed? My extension RExT<https://addons.mozilla.org/firefox/addon/rext/>uses Java to interpret regular expressions and it is still working using
I asked in #developers IRC channel before posting.
So, you could get more info there.

Honza
Reply all
Reply to author
Forward
0 new messages