Hi everyone,
I am having some issues while trying to implement a "wait for debugger"
feature on my debugger client connection. I want to allow my user to have
its script execution paused until he connect his debugger client to v8.
I am trying to do this by calling v8::Debug::DebugBreak before my Script
runs (that's how the former v8::Debug::EnableAgent use to do this). My
application is multi-threaded, so each v8 API call use a v8::Locker to be
thread safe.
So my use case could be summarized as :
//...
v8::Debug::DebugBreak();
StartMyDebuggerListenerThread();
{
v8::Locker lock(my_isolate);
myScript->Run()
}
//...
My problem is that the DebugBreak function sets some interruption flags on
the local thread (to trigger the break when possible I guess).
* See execution.cc StackGuard::RequestInterrupt(int flagbit)*
But the locker clears this flag, while it's being initialized.
* See v8threads.cc Locker::Initialize(V8::Isolate* isolate), during
the RestoreThread() call*
So whenever I try to trigger a break, it's cancelled by the next Locker I
hit. Am I doing something wrong ? I am using v8 3.27.34.20 could this be
related to my version, and be fixed in the next ones ? (From what I see, I
does not seem to change in the last version)
Another quick question, how does v8 trigger this break (performed by
v8::Debug::DebugBreak() ) ? Is this done automatically ? or do I have to
call v8::Debug::ProcessDebugMessage to process it like a DebugCommand ?
Thanks a lot for your help,
Have a good day,
Julien.
--
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.