Debug Interface for the mozjs, how to start/stop/pause/continue the js engine
lemmel <[email protected]> Sun, 05 Apr 2020 21:54:29 +0200
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <1617606.88ryHSEGo5@sakura> |
Hi ! Once upon a time I used QtScript and QScriptEngineDebugger; both tools gave me the ability to: - run JS script - have a debug interface: start/stop/pause/continue/breakpoint/stackwalker/ etc for a teaching tool: a learner could code, run the code, and debug it. Then Qt stopped QtScript and migrated to QJSEngine, a library that does not provide a debug interface. Then I used ChakraCore ... then Microsoft switched to Chrome ... As of now, I'm evaluating several solutions, and I test spidermonkey engine. So I'm able to have some test code running, but the core need remains the debug interface, but as of now, I'm not able to understand how to do anything. The mozjs library seems synchronous (so no start/stop/pause call), I saw something about a Debug Protocol (but mozjs doesn't seems to open ports), I saw the Debugger API (but I don't see how to even pause the execution). Is there some docs[1] ? Example ? Or a project that includes a debugger ? Or could you give me some hints/explanations ? Thanks for your attention. [1] Already found: - https://developer.mozilla.org/en-US/docs/Tools/Debugger-API/Debugger - https://mozilla-spidermonkey.github.io/ - https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples