ClearScript icon indicating copy to clipboard operation
ClearScript copied to clipboard

Debugging ClearScript with Visual Studio Code

Open flat-eric147 opened this issue 1 year ago • 2 comments

Hi there, I am currently trying to figure out who to debug and ideally modify my ClearScript code through Visual Studio Code. I am surprised to find that it does not work as good as with chrome inspector. It seems the extension on which ClearScript was tested and documented is now obsolete. debugextensionobsolete Instead the "Javascript Debugger" seems to be the new default. The launcher settings "protocol":"inspector" don't seem to work anymore on this. javsascripdebug

While using this debugger, I am unable to modify code when in break mode, and thus it can't be pushed back to ClearScript. I tried also with a local module which I imported, even when I modify that, changes on that external module are not applied to the running script.

I suspect ClearScrip does not support this new/different debug commands coming from vscode, but I'm not an expert on this unfortunately.

Any input or ideas on this, perhaps I'm just doing it wrong :) Thank you!

flat-eric147 avatar May 02 '24 20:05 flat-eric147

Hi @flat-eric147,

I suspect ClearScrip does not support this new/different debug commands coming from vscode

ClearScript's role in V8 debugging is limited to providing a communication channel between V8 and the debugger. It isn't involved in the implementation of the debugging protocol itself.

It's possible that newer V8 versions provide debugging hooks that ClearScript doesn't yet support, and we'll take a closer look at that, but differences in debugging functionality are most likely due to differences in the debuggers.

Thank you!

ClearScriptLib avatar May 03 '24 04:05 ClearScriptLib

Happy to see the latest ClearScript release, will give it a shot! Judging by the documentation you have not worked on the debugging feature a lot I suspect. I would whish that you took a look at the "remote debugging" documentation- that really is outdated....! Thank you!

flat-eric147 avatar May 11 '25 08:05 flat-eric147