Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to go about debugging WebAssembly running in the browser? #166589

Closed
mmarczell-graphisoft opened this issue Nov 17, 2022 · 2 comments
Closed
Assignees
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@mmarczell-graphisoft
Copy link

Currently the only way to debug C++ code that is running inside the browser compiled to WASM is a closed source Chrome extension by Google. This is quite limited and buggy. (Sometimes it doesn't even work, most of the time stepping doesn't work, standard library types are not all inspectable etc.)

My team is thinking about how this situation could be improved. I'm looking for feedback on whether our line of thinking is correct.

Our idea is that a VSCode extension could be written that integrates with the existing browser debugging experience in VSCode, but also interprets the DWARF debugging information contained within the WASM file and enables breaking, stepping and inspecting variables in C++ source files. (I recall that if we switch out the buildtime DWARF generation for sourcemap generation, this already works, except for inspecting values, which makes it quite useless for serious work.)

What I'm not certain about is where the boundaries of responsibility lie between VSCode itself, the browser being debugged, the existing C++ extension and a theoretical new "Wasm debugger" extension. Is it possible for an extension to do all the above? Do the required points of extensibility exist within the browser debugging flow and the debugger itself? (It would be rather less convenient if we had to fork VSCode itself to achieve this.)

@vscodenpa vscodenpa added the debug Debug viewlet, configurations, breakpoints, adapter issues label Nov 17, 2022
@roblourens roblourens assigned connor4312 and unassigned roblourens Nov 17, 2022
@connor4312
Copy link
Member

Duplicates microsoft/vscode-js-debug#1205

@connor4312 connor4312 added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 17, 2022
@mmarczell-graphisoft
Copy link
Author

Thank you for pointing me there :)

@github-actions github-actions bot locked and limited conversation to collaborators Jan 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debug Debug viewlet, configurations, breakpoints, adapter issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

4 participants