[webkit-dev] Inspector module

Ilya Tikhonovsky loislo at chromium.org
Thu Oct 7 02:16:45 PDT 2010


+pfeldman

Regards,
Tim.


On Thu, Oct 7, 2010 at 12:54 PM, Tomasz Morawski <t.morawski at samsung.com>wrote:

> Hi,
> I have a few questions about inspector/JS debugging feature. I am trying to
> get a JS frame after
> pausing script execution due to breakpoint reach. If I understand good the
> „pausedScript” event  that  is send to my InspectorClient class via the
> sendMessageToFrontend function should has JS frame that I looking for.
>
> {"type":"event","event":"pausedScript","data":{"callFrames":null}}
>
> But the callFrames field is null. The “callFrames” field is filed by an
> InspectorDebuggerAgent::currentCallFrames() function.  Could you tell me
> what is an InjectedScriptHost class what is the purpose of this class and
> how I should use this object to get a callFrame? Maybe I have forgotten to
> dispatch some commands?
> What commands should be dispatched via an InspectorBackendDispatcher object
> to get a callFrame after JS execution pause?
>
> For test purpose I have written a code:
>
> InspectorDebuggerAgent::currentCallFrames()
> {
>    JavaScriptCallFrame* frame =
> ScriptDebugServer::shared().currentCallFrame();
>    if (!frame)
>    {
>        fprintf(stderr, "source: %d\n", frame->sourceID());
>        fprintf(stderr, "line:   %d\n", frame->line());
>        fprintf(stderr, "function:   %s\n",
> frame->functionName().ascii().data());
>
>        JSC::JSGlobalObject *gobject = frame->dynamicGlobalObject();
>        JSC::ExecState* exec = gobject->JSGlobalObject::globalExec();
>        if (exec)
>            fprintf(stderr, "function parameters: %d \n",
> exec->argumentCount());
>    }
>
> But exec->argumentCount returns invalid parameters count.
>
> Best regards,
> Tomasz Morawski
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20101007/1f0ab4e9/attachment.html>


More information about the webkit-dev mailing list