Last Comment Bug 692722 - add -d flag to xpcshell for debug mode
: add -d flag to xpcshell for debug mode
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: unspecified
: x86_64 Linux
: -- normal (vote)
: mozilla11
Assigned To: Steve Fink [:sfink] [:s:]
:
Mentors:
Depends on:
Blocks: 692987
  Show dependency treegraph
 
Reported: 2011-10-06 23:33 PDT by Steve Fink [:sfink] [:s:]
Modified: 2011-11-21 09:06 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Implement xpcshell -d (3.63 KB, patch)
2011-10-07 00:07 PDT, Steve Fink [:sfink] [:s:]
mrbkap: review+
Details | Diff | Review

Description Steve Fink [:sfink] [:s:] 2011-10-06 23:33:06 PDT
I'd like to be able to write a JSD test as an xpcshell test rather than a full-on browser-chrome test. For that, I need a -d flag to start up with debugging on. I can't turn on debugging from my test script because currently it is only possible to turn on debug mode when no JS stack frames are live, which of course they are when running a test script.
Comment 1 Steve Fink [:sfink] [:s:] 2011-10-07 00:07:10 PDT
Created attachment 565454 [details] [diff] [review]
Implement xpcshell -d

The JS shell has a -d flag, but the same implementation won't work here because I really need JSD debugging to be active, not just SpiderMonkey's debug mode. And there's no straightforward way to do that -- JSD currently has to use an asynchronous API with a callback that is invoked when debugging is on for realz, and XPConnect is responsible for waiting for an idle moment when it's safe to turn on.

So this patch adds xpc_ActivateDebugMode() usable only in extremely limited situations such as this where it is known to be safe to enable debugging.

All of this is somewhat temporary -- when tracemonkey disappears, it'll be possible to turn on debugging immediately, and when Firebug gets ported to jsdbg2 then JSD will probably be nuked entirely. But I'd like to be able to write xpcshell tests of JSD in the meantime.
Comment 2 Marco Bonardo [::mak] 2011-10-13 03:49:35 PDT
backed out bug 689101, bug 692987 and bug 692722, since one of these caused permaorange on OSX64 m-oth tests (bug 692605 went permaorange on inbound, exactly)
Comment 3 Steve Fink [:sfink] [:s:] 2011-11-20 22:03:58 PST
Trying again. Try push looked good: https://tbpl.mozilla.org/?tree=Try&rev=51ba3fc4f12f

https://hg.mozilla.org/integration/mozilla-inbound/rev/7742dd3cab64
Comment 4 Matt Brubeck (:mbrubeck) 2011-11-21 09:06:33 PST
https://hg.mozilla.org/mozilla-central/rev/7742dd3cab64

Note You need to log in before you can comment on or make changes to this bug.