Re: [webkit-dev] JavaScriptCore and the V8 debugger protocol

2010-03-09 Thread jamey.hicks
Hi Jonathan,

I've been working on remote debugging/profiling of webkit and I've been 
leveraging work that the webkit and chromium guys did to separate the Web 
Inspector frontend from backend.

I was actually thinking about sending email to the list this morning about 
agreeing on a remote/on-device protocol for debugging and profiling webkit.

It is possible to replace the javascript in the Web Inspector front-end in 
order to enable a remote connection to the Web Inspector backend. Once you do 
that, you can remotely debug, inspect, and profile your code.

I have made two prototypes enable remote debugging. In these two prototypes, I 
have used the Web Inspector UI running in Safari or WebKit on a desktop 
connected to the backend running in a webkit instance on another device. My 
first prototype was all implemented in C++ for qtwebkit. There is a patch with 
this code:

 Qt debug agent partially implementing ChromeDevTools and V8 debug 
protocolhttps://bugs.webkit.org/attachment.cgi?id=48913 attached to 
https://bugs.webkit.org/show_bug.cgi?id=35016

Given the feedback on that set of patches, I've been working on a javascript 
debug agent with this patch to load alternate inspector javascript:
https://bugs.webkit.org/show_bug.cgi?id=35340

I also did a partial implementation of the ChromeDevTools protocol and a 
V8Debug protocol adapter for JavaScriptCore.

In discussions with some of the Chromium guys, it sounds like they would like 
to move ChromeDevTools protocol closer to the internal protocol used by WebKit. 
I would like to see a stable inspection/profiling/debug protocol for WebKit and 
JavaScriptCore.

Best regards,
Jamey Hicks


On Mar 8, 2010, at 7:18 PM, ext Fischoff, Jonathan wrote:

I would like to control JavaScript execution in my app remotely using the V8 
debugger protocol. Does anyone know if there exists code that implements and 
the V8 debugger protocol for JavaScriptCore?

My main goal is remotely debug JavaScript, so I am also wondering what other 
technologies exist for remotely debugging JavaScriptCore. Any ideas?

-Jonathan Fischoff
ATT1..txt

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] JavaScriptCore and the V8 debugger protocol

2010-03-10 Thread jamey.hicks
Hi Jonathan,

If you're only using JavaScriptCore, then it's probably better only to use 
support from the JavaScriptCore directory.

In terms of defining a debug protocol, you're right -- it would be helpful if  
the debug portion of the protocol was focused on the javascript engines. 
WebCore is somewhat independent of javascript runtimes, so a debug protocol 
needs to work with both JavaScriptCore and V8 javascript runtimes at minimum.

Jamey

On Mar 9, 2010, at 6:23 PM, ext Fischoff, Jonathan wrote:

Hey Jamey,

Thanks for the links and explanation. I am still incredibly new to the 
codebase, but it looks like you have done much of what I need.

However, I am only using the JavaScriptCore portion of Webkit. I am under the 
impression the changes you made require WebCore to perform the remote 
debugging. Likewise, the trunk code is coupled similarly for local debugging.

I wonder if coupling the debugging helper classes for JSC with WebCore is 
ideal. It appears that ScriptDebugServer could be separated into portions that 
do not require WebCore, that would facilitate the building of a debugger for 
just JSC.

Since you are on the precipice of forming a consensus, it might be worth 
designing the remoting so it could be used at a lower level.

-Jonathan


From: jamey.hi...@nokia.commailto:jamey.hi...@nokia.com 
[mailto:jamey.hi...@nokia.com]
Sent: Tuesday, March 09, 2010 5:31 AM
To: Fischoff, Jonathan
Cc: webkit-dev@lists.webkit.orgmailto:webkit-dev@lists.webkit.org
Subject: Re: [webkit-dev] JavaScriptCore and the V8 debugger protocol

Hi Jonathan,

I've been working on remote debugging/profiling of webkit and I've been 
leveraging work that the webkit and chromium guys did to separate the Web 
Inspector frontend from backend.

I was actually thinking about sending email to the list this morning about 
agreeing on a remote/on-device protocol for debugging and profiling webkit.

It is possible to replace the javascript in the Web Inspector front-end in 
order to enable a remote connection to the Web Inspector backend. Once you do 
that, you can remotely debug, inspect, and profile your code.

I have made two prototypes enable remote debugging. In these two prototypes, I 
have used the Web Inspector UI running in Safari or WebKit on a desktop 
connected to the backend running in a webkit instance on another device. My 
first prototype was all implemented in C++ for qtwebkit. There is a patch with 
this code:

 Qt debug agent partially implementing ChromeDevTools and V8 debug 
protocolhttps://bugs.webkit.org/attachment.cgi?id=48913 attached to 
https://bugs.webkit.org/show_bug.cgi?id=35016

Given the feedback on that set of patches, I've been working on a javascript 
debug agent with this patch to load alternate inspector javascript:
https://bugs.webkit.org/show_bug.cgi?id=35340

I also did a partial implementation of the ChromeDevTools protocol and a 
V8Debug protocol adapter for JavaScriptCore.

In discussions with some of the Chromium guys, it sounds like they would like 
to move ChromeDevTools protocol closer to the internal protocol used by WebKit. 
I would like to see a stable inspection/profiling/debug protocol for WebKit and 
JavaScriptCore.

Best regards,
Jamey Hicks


On Mar 8, 2010, at 7:18 PM, ext Fischoff, Jonathan wrote:


I would like to control JavaScript execution in my app remotely using the V8 
debugger protocol. Does anyone know if there exists code that implements and 
the V8 debugger protocol for JavaScriptCore?

My main goal is remotely debug JavaScript, so I am also wondering what other 
technologies exist for remotely debugging JavaScriptCore. Any ideas?

-Jonathan Fischoff
ATT1..txt


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] WebKit blog post proposal: Remote debugging with Web Inspector.

2010-08-12 Thread jamey.hicks

On Aug 9, 2010, at 3:48 PM, ext Pavel Feldman wrote:

Hi guys,

As some of you know, we are working on a remote debugging feature in Web 
Inspector. There are many good reasons behind the project including the 
following:

- Debugging WebKit on embedded devices
- Shaping up a good protocol for ourselves
- Introducing external SDKs on top of the protocol for IDE integrations and 
alternate front-ends

We've had serialized interaction with the out-of-process inspector for quite a 
while in Chromium. We were upstreaming it into WebKit and have reached an 
important milestone recently: all the interaction between the inspected page 
and inspector is entirely serialized on the WebKit level. All the embedder 
needs to do is to implement a socket that would serve the inspector front-end 
files and provide our messaging with appropriate transport.

Now this socket is likely to be platform-specific, implemented on the WebKit 
and/or host browser levels. It also makes more sense to implement socket on 
mobile platforms first. However, we've done a proof-of-concept implementation 
in Chromium and it is now in a demoable state! See the screencast at 
http://screencast.com/t/YTI2OTY4YTEt. It has Chromium nightly to the left + 
WebKit nightly to the right. WebKit nightly connects remotely to Chromium over 
HTTP on the port 9222 and does remote debugging including DOM inspection, 
breakpoints and such. The communication is established by means of a WebSocket. 
The interesting thing about the implementation is that inspector front-end is 
fetched from the host browser, so that there is no mess with protocol 
versioning and no need in exposing the interaction protocol any time soon.

So I made the demo and it looked cool. I thought maybe we do a blog post on it. 
The blog post would draw attention to the Web Inspector and its progress, share 
the remote debugging vision with the interested parties and would simply look 
cool. Front-end is working as a pure HTML5 application (obviously full of 
WebKit-specific styles, but still) which is impressive. Now the project is 
nowhere complete in terms of finalizing the message format and the protocol 
itself, but there is no intention to expose it right now. We'd like to let it 
live with fetchable front-end and mature before we expose the protocol and 
commit to any level of interface support.

What do you think, is it ready for a blog post?

I think it is ready for a blog post. Nice work!

I've been leveraging your work to make remote Web Inspector work in QtWebKit. 
I've also been working on exposing a ChromeDevTools / V8 debugger protocol 
backend so that we can use an Eclipse IDE for W3C Widget and Qt WRT debugging. 
The IDE debugger backend is structured as an alternate front-end for Web 
Inspector. I submitted several patches to enable that, and I think our debugger 
backend is getting to a state where I'm willing to post that code as well.

Best regards,
Jamey Hicks




___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] InspectorDebuggerAgent::didPause function

2010-10-19 Thread jamey.hicks
Hi Tomasz,

I have a patch for JavaScriptCore to let you determine if an exception happened 
and what it was, if you're using JSC instead of V8.

We found that users of the front-end wanted to know if the pause was due to an 
exception, and if so, what it was.

Jamey

On Oct 19, 2010, at 9:12 AM, ext Yury Semikhatsky wrote:

Hi Tomasz,

There is no need to differentiate between pause due to an exception and due to 
a breakpoint hit and there are no means to determine that in 
InspectorDebuggerAgent::didPause. Detailed information about the break event is 
available in WebCore/bindings/v8/ScriptDebugServer::handleV8DebugEvent(I 
believe it can be retrieved in WebCore/bindings/js/ScriptDebugServer too) where 
we can say whether it was an exception or not, we just don't push it to 
InspectorDebuggerAgent since we don't need it in the front-end.

-yury

On Tue, Oct 19, 2010 at 5:01 PM, Tomasz Morawski 
t.moraw...@samsung.commailto:t.moraw...@samsung.com wrote:
Hi,
Is there any way to get know if InspectorDebuggerAgent::didPause call was due 
to an exception or not? I have tried to use scriptState-hadException() inside 
this function but it seems that the hadException function always returns false.

Thanks,
___
webkit-dev mailing list
webkit-dev@lists.webkit.orgmailto:webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

ATT1..txt

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] InspectorDebuggerAgent::didPause function

2010-10-19 Thread jamey.hicks
Hi Tomasz,

I don't have time to update the Web Inspector UI to use this feature, but I'll 
find the patch and upload it to bugs.webkit.org and CC you. We used it with our 
frontend that adds Eclipse Chrome Dev Tools support with QtWebKit which 
currently uses JSC rather than V8.

Jamey

On Oct 19, 2010, at 9:44 AM, ext Tomasz Morawski wrote:

 Hi Jamey,
 Yes, I am using JSC.
 
 I have a patch for JavaScriptCore to let you determine if an exception
 happened and what it was, if you're using JSC instead of V8.
 Could you provide this patch?
 
 We found that users of the front-end wanted to know if the pause was due
 to an exception, and if so, what it was.
 Yes, it is very useful. Is there any plans to add this feature into
 WebKit?
 
 Thanks,
 
 
 Jamey
 
 On Oct 19, 2010, at 9:12 AM, ext Yury Semikhatsky wrote:
 
 Hi Tomasz,
 
 There is no need to differentiate between pause due to an exception
 and due to a breakpoint hit and there are no means to determine that
 in InspectorDebuggerAgent::didPause. Detailed information about the
 break event is available in
 WebCore/bindings/v8/ScriptDebugServer::handleV8DebugEvent(I believe it
 can be retrieved in WebCore/bindings/js/ScriptDebugServer too) where
 we can say whether it was an exception or not, we just don't push it
 to InspectorDebuggerAgent since we don't need it in the front-end.
 
 -yury
 
 On Tue, Oct 19, 2010 at 5:01 PM, Tomasz Morawski
 t.moraw...@samsung.com mailto:t.moraw...@samsung.com wrote:
 
Hi,
Is there any way to get know if InspectorDebuggerAgent::didPause
call was due to an exception or not? I have tried to use
scriptState-hadException() inside this function but it seems that
the hadException function always returns false.
 
Thanks,
___
webkit-dev mailing list
webkit-dev@lists.webkit.org mailto:webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
 
 
 ATT1..txt
 
 

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev