On 6/1/2015 2:53 AM, Philipp Kewisch wrote:
Not sure how this works in Visual Studio, but check out:

http://www-archive.mozilla.org/scriptable/javascript-stack-dumper.html

In gdb you can do "call DumpJSStack()"

Philipp


Here's what I do.

After your C++ breakpoint is hit, in Visual Studio do:

1)      In the callstack, make sure that the selected line is in xul.dll

2)      Open Debug/Quickwatch

3)      For the Expression, enter "DumpJSStack()" (without quotes)

4)      You should see in the Console output results that look like this:

0 GenericSendMessage(msgType = 0) ["chrome://messenger/content/messengercompose/MsgComposeCommands.js":2691]
    this = [object ChromeWindow]
1 SendMessage() ["chrome://messenger/content/messengercompose/MsgComposeCommands.js":2772]
    this = [object ChromeWindow]
2 defaultController.commands.cmd_sendButton.doCommand() ["chrome://messenger/content/messengercompose/MsgComposeCommands
.js":569]
    this = [object Object]
3 defaultController.doCommand(aCommand = "cmd_sendButton") ["chrome://messenger/content/messengercompose/MsgComposeComma
nds.js":726]
    this = [object Object]
4 goDoCommand(aCommand = "cmd_sendButton") ["chrome://global/content/globalOverlay.js":96]
    this = [object ChromeWindow]
5 oncommand(event = [object XULCommandEvent]) ["chrome://messenger/content/messengercompose/messengercompose.xul":1]
    this = [object XULElement]

I always run with a console output (start Thunderbird as thunderbird.exe -console)

:rkent
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to