Hi there !
I'm trying to build a V8 debugger.
So I have my app and my debugger.
In my app i call :
void DispatchDebugMessage()
{
Context::Scope scope(debug_message_context);
Debug::ProcessDebugMessages();
}
...
debug_message_context = PContext::New(GlobalContext);
Debug::SetDebugMessageDispatchHandler(JumpStart::DispatchDebugMessage);
Debug::EnableAgent("myApp", _debugPort, true);
Execution halts in EnableAgent, it seems ok ...
In my debuger I create a socket in the good port and I do some recv/send :
recv <- Type: connect
V8-Version: 3.13.0
Protocol-Version: 1
Embedding-Host: JumpStart
Content-Length: 0
send -> Content-Length: 50
{"seq":1,"type":"request","command":"scripts"}
recv <- Content-Length: 857
{"seq":0,"request_seq":1,"type":"response","command":"scripts","success":true,"body":[{"handle":1,"type":"script","name":"JScalc.js","id":15,"lineOffset":0,"columnOffset":0,"lineCount":19,"sourceStart":"Sys.use('GUI');\r\n\r\nvar
wnd = new GUI.Window({\r\n\ttitle: \"JScalc\",\r\n\tx: 100,\r\n\ty:
","sourceLength":256,"scriptType":2,"compilationType":0,"context":{"ref":0},"text":"JScalc.js
(lines:
19)"},{"handle":3,"type":"script","name":"JumpStart.js","id":14,"lineOffset":0,"columnOffset":0,"lineCount":34,"sourceStart":"Object.defineProperty(Function.prototype,
'toClass', { \r\n value: function
(su","sourceLength":970,"scriptType":2,"compilationType":0,"context":{"ref":2},"text":"JumpStart.js
(lines:
34)"}],"refs":[{"handle":0,"type":"context","text":"#<ContextMirror>"},{"handle":2,"type":"context","text":"#<ContextMirror>"}],"running":false}
It's seems ok but my app crashes immediatly after sending the response
message.
Did I do something wrong ?
Best regards,
Florent STEINER
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users