Starting firefox -venkman

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Starting firefox -venkman

Wink Saville
 From what I understand starting firefox -venkman should only start
the debugger and not the browser UI, thus allowing the debugging
of extension loading. When I do this both the debugger and the
browser UI is started, not what I expected.

Is there something I'm doing in correctly or is my expectation  
incorrect.

Cheers,

Wink Saville

_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

John J Barton
Wink Saville wrote:

>  From what I understand starting firefox -venkman should only start
> the debugger and not the browser UI, thus allowing the debugging
> of extension loading. When I do this both the debugger and the
> browser UI is started, not what I expected.
>
> Is there something I'm doing in correctly or is my expectation incorrect.
>
> Cheers,
>
> Wink Saville
>

Your expectation makes sense, but as far as I know venkman is an
extension to firefox and hence is loaded after the firefox starts.

I think with FF3 something better could be done: I remember some
discussion of an "app" command line argument which puts firefox into a
kind of XULRunner mode.

I am working on Chromebug to bring Firebug to extensions. If it could
load first with "app" then control the loading of extensions then
extension startup could be debugged.

John.
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

Gijs Kruitbosch ("Hannibal")
In reply to this post by Wink Saville
Wink Saville wrote:

>  From what I understand starting firefox -venkman should only start
> the debugger and not the browser UI, thus allowing the debugging
> of extension loading. When I do this both the debugger and the
> browser UI is started, not what I expected.
>
> Is there something I'm doing in correctly or is my expectation incorrect.
>
> Cheers,
>
> Wink Saville
>

Venkman starts up first.
- You can add debugger; statements to your extension's code to have it
stop there.
- You could be really fast in setting up breakpoints.
- You could create breakpoints when you feel like it while Firefox is up
normally, and tell Venkman to load them automatically (check "Save
Break/Watch settings" in the File menu).

~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

John J Barton
Gijs Kruitbosch wrote:

> Venkman starts up first.

Hi Gijs, do you know how Venkman gets in first?

> - You can add debugger; statements to your extension's code to have it
> stop there.

You might have to run Venkman once and exit before this will work.
Venkman has to set some bit to start JSD on startup and it can't do that
until its had control once.  Or so I guess from the name of the method,
jsd.initAtStartup.

> - You could be really fast in setting up breakpoints.
> - You could create breakpoints when you feel like it while Firefox is up
> normally, and tell Venkman to load them automatically (check "Save
> Break/Watch settings" in the File menu).

...and then exit and restart (in case that wasn't clear).

>
> ~ Gijs
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

Justin Wood (Callek)-2
John J. Barton wrote:
> Gijs Kruitbosch wrote:
>
>> Venkman starts up first.
>
> Hi Gijs, do you know how Venkman gets in first?
>

I guess he more means "the venkman window" which if it loads minus the
firefox window (am taking that for granted in this thread) then yes it
definately comes up first.

If he means "before the services of said extension" than no, they
initialize first.

~Justin Wood (Callek)
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

John J Barton
Justin Wood (Callek) wrote:

> John J. Barton wrote:
>> Gijs Kruitbosch wrote:
>>
>>> Venkman starts up first.
>>
>> Hi Gijs, do you know how Venkman gets in first?
>>
>
> I guess he more means "the venkman window" which if it loads minus the
> firefox window (am taking that for granted in this thread) then yes it
> definately comes up first.

Because "firefox.exe -venkman" causes the venkman command line handler
to run which opens a venkman window and this happens before the firefox
window opens?

>
> If he means "before the services of said extension" than no, they
> initialize first.

I guessing that "firefox.exe -venkman" means that at least the command
line handlers have to run, and thus the components in each extension
would have to be registered to see if they have command line handlers.
Therefore at least we compile extensions/*/components/*.js and call all
the NSGetModule() and run command line handlers? In the order given by
that funky m- rule? Is that stuff what you mean by services?


>
> ~Justin Wood (Callek)
_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger
Reply | Threaded
Open this post in threaded view
|

Re: Starting firefox -venkman

Wink Saville
In reply to this post by Justin Wood (Callek)-2
Justin Wood (Callek) wrote:

> John J. Barton wrote:
>> Gijs Kruitbosch wrote:
>>
>>> Venkman starts up first.
>> Hi Gijs, do you know how Venkman gets in first?
>>
>
> I guess he more means "the venkman window" which if it loads minus the
> firefox window (am taking that for granted in this thread) then yes it
> definately comes up first.
>
> If he means "before the services of said extension" than no, they
> initialize first.
>
> ~Justin Wood (Callek)
> _______________________________________________
> dev-apps-js-debugger mailing list
> [hidden email]
> https://lists.mozilla.org/listinfo/dev-apps-js-debugger

My desire was to have venkman start before my extension as it appeared
there was something wrong with my xul file (see below). But apparently
that isn't possible.

Anyway for those interested, I resolved my problem. Turns out that the
MacOS version of FF doesn't seem to handle the <menubar> at line 10 & 28
and if present no buttons are displayed. This xul does work on PC and Linux:

1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3 <overlay id="sample"
4         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
5         <script type="application/x-javascript" src="chrome://sparkrocket/content/ll.js"/>
6         <script type="application/x-javascript" src="chrome://sparkrocket/content/ajax_queue.js"/>
7         <script type="application/x-javascript" src="chrome://sparkrocket/content/sr.js"/>
8         <script type="application/x-javascript" src="chrome://sparkrocket/content/prefutils.js"/>
9         <toolbaritem id="urlbar-container">
10                 <menubar position="1" id="SparkRocketMenuBar">
11                         <!--style="width: 50px; height: 32px" style attribute for buttons -->
12                         <button type="menu"
13                                 id="SparkMenu"
14                                 image="chrome://sparkrocket/content/spark-16x16.png"
15                                 label="Sparks">
16                                 <menupopup id="SparkMenuPopup">
17                                         <menuitem label="SparkRocket" oncommand="sr_goto('http://www.sparkrocket.com');"/>
18                                 </menupopup>
19                         </button>
20                         <button type="menu"
21                                 id="RocketMenu"
22                                 image="chrome://sparkrocket/content/rocket-16x16.png"
23                                 label="Rockets">
24                                 <menupopup id="RocketMenuPopup">
25                                         <menuitem label="No friends to target yet"/>
26                                 </menupopup>
27                         </button>
28                 </menubar>
29         </toolbaritem>
30 </overlay>

If delete the menubar tags and use position in the buttons I get what I
want, two buttons as the first items in the url-container:

1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
3 <overlay id="sample"
4         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
5         <script type="application/x-javascript" src="chrome://sparkrocket/content/ll.js"/>
6         <script type="application/x-javascript" src="chrome://sparkrocket/content/ajax_queue.js"/>
7         <script type="application/x-javascript" src="chrome://sparkrocket/content/sr.js"/>
8         <script type="application/x-javascript" src="chrome://sparkrocket/content/prefutils.js"/>
9         <toolbaritem id="urlbar-container">
10
11                         <!--style="width: 50px; height: 32px" style attribute for buttons -->
12                         <button position="1" type="menu"
13                                 id="SparkMenu"
14                                 image="chrome://sparkrocket/content/spark-16x16.png"
15                                 label="Sparks">
16                                 <menupopup id="SparkMenuPopup">
17                                         <menuitem label="SparkRocket" oncommand="sr_goto('http://www.sparkrocket.com');"/>
18                                 </menupopup>
19                         </button>
20                         <button position="2" type="menu"
21                                 id="RocketMenu"
22                                 image="chrome://sparkrocket/content/rocket-16x16.png"
23                                 label="Rockets">
24                                 <menupopup id="RocketMenuPopup">
25                                         <menuitem label="No friends to target yet"/>
26                                 </menupopup>
27                         </button>
28
29         </toolbaritem>
30 </overlay>


_______________________________________________
dev-apps-js-debugger mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-apps-js-debugger