[webkit-dev] How to set breakpoints in JavaScript Engine of WebKit on MacOS

Meryl Silverburgh silverburgh.meryl at gmail.com
Thu May 28 23:28:37 PDT 2009


On Fri, May 15, 2009 at 11:07 PM, Darin Adler <darin at apple.com> wrote:
> On May 15, 2009, at 10:50 PM, Meryl Silverburgh wrote:
>
>> I am able to download and compile both WebCore project and
>> JavaScriptCore project using XCode on Macos.
>> I have created a custom executable (pointing to
>> /Application/Safari.app) in my WebCore project.  The browser is
>> launched and I can set breakpoints in WebCore.  But my question is how
>> can I set breakpoints in JavaScript engine?
>>
>> e.g. I want to load www.cnn.com in the brower and i want it to break at
>> void Parser::parse(JSGlobalData* globalData, int* errLine, UString*
>> errMsg)
>>
>> in JavaScriptCore (Parser.cpp).
>
> Just open the source file and set a breakpoint. It should work. I do that
> all the time.
>
Thank you. I tried the following, but it still does not work:
1. open WebCore xcode project (build and go (debug) runs fine, it
launches a Safari.app)
2. Go to File->Open, and open JavaScriptCore/parser/Parser.cpp
3. File, Parser.cpp, got opened in XCode.
4. Go to line 42, set a breakpoint, a Yellow with blue border'
bookmark showed up

void Parser::parse(JSGlobalData* globalData, int* errLine, UString* errMsg)
{
    m_sourceElements = 0;

5. 'Build and Go' in Webkit project.
6. Load www.aol.com

But my breakpoint in JavaScript Parser never breaks.

Can you please tell me what am i missing? Any help is appreciated.
Thank you.


> You can also create a custom executable in the JavaScriptCore project and
> start Safari from there instead of the WebCore project.
>
>    -- Darin
>
>


More information about the webkit-dev mailing list