You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generally all J2V8 debug API are "well documented" by test cases.
The only thing, which I am not able to find is "pause v8 execution" neither in the debug api nor in V8 itself.
I was expecting v8 being paused when DebugEvent.Break is received by BreakHandler - but it's not the case. V8 keep running and other DebugEvent.Break are fired afterwards (if other breakpoints were set before).
@irbull in #293 you was mentioning, that it's possible to build debugger (using Stetho). Can you please share the info of how v8 could be paused?
E.g. I would like to pause it when DebugEvent.Break is received by BreakHandler and invoke resume method later manually.
I was able to "hack" it by suspending Java thread in the onBreak() call-back of BreakHandler by CountDownLatch.await(). But it does not looks like nice solution from my point of view (I suspect, that there is proper api for this) . Also I am not sure wether it will work nice with multi-threaded J2V8, which I am planing to use in the future.
The text was updated successfully, but these errors were encountered:
…in Chrome DevTools: 1. Added pause on break-point in BreakHandler
(work-around using CountDownLatch until proper V8 pause api found - eclipsesource/J2V8#411)
2. Store BreakHandler in Debugger and resume V8 execution by calling .resume() when requested by Chrome DevTools
Generally all J2V8 debug API are "well documented" by test cases.
The only thing, which I am not able to find is "pause v8 execution" neither in the debug api nor in V8 itself.
I was expecting v8 being paused when
DebugEvent.Break
is received by BreakHandler - but it's not the case. V8 keep running and otherDebugEvent.Break
are fired afterwards (if other breakpoints were set before).@irbull in #293 you was mentioning, that it's possible to build debugger (using Stetho). Can you please share the info of how v8 could be paused?
E.g. I would like to pause it when
DebugEvent.Break
is received by BreakHandler and invoke resume method later manually.I was able to "hack" it by suspending Java thread in the
onBreak()
call-back of BreakHandler byCountDownLatch.await()
. But it does not looks like nice solution from my point of view (I suspect, that there is proper api for this) . Also I am not sure wether it will work nice with multi-threaded J2V8, which I am planing to use in the future.The text was updated successfully, but these errors were encountered: