lostintangent / codeswing

VS Code extension for building web applications ("swings") using a interactive and editor-integrated coding environment
https://aka.ms/codeswing
MIT License
978 stars 48 forks source link

[Request] - Debugger integration #41

Open jasonwilliams opened 3 years ago

jasonwilliams commented 3 years ago

As the Swings can contain JS, it would be nice to have VSCode's debugger integrate with the script you add. This would allow users to set breakpoints on the script.js file and hit debug on the side bar.

A naive approach to this working would be to add a .vscode/launch.json file to the temp folder, but maybe there's better ways

ryandejaegher commented 3 years ago

This would be awesome!

TFTomSun commented 1 year ago

What would be necessary to get debugging within vscode work?

lostintangent commented 1 year ago

I believe we'd need to implement a VS Code debug adapter. It wouldn't be a trivial amount of work, which is why I haven't prioritized it (in addition to the fact that I haven't heard the request that many times).

jasonwilliams commented 1 year ago

I believe we'd need to implement a VS Code debug adapter. It wouldn't be a trivial amount of work, which is why I haven't prioritized it (in addition to the fact that I haven't heard the request that many times).

Implementing debug adapters are usually for new languages, there are existing debuggers for JavaScript/TypeScript out the box so I don’t think that’s the case here. This would be more about integrating with the existing debugger into what Codeswing offers.

I’ve since used live preview which does something similar