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

wasm DWARF support #1205

Closed
flipkickmedia opened this issue Feb 15, 2022 · 8 comments
Closed

wasm DWARF support #1205

flipkickmedia opened this issue Feb 15, 2022 · 8 comments
Assignees
Labels
feature-request Request for new features or functionality

Comments

@flipkickmedia
Copy link

Support C++ wasm with embedded DWARF

Currently it's possible inside Chrome Dev Tools to interactively debug C++ source.
image

When a debugging session starts, this is the same result inside VSCode, unfortunately VSCode cant handle the encoding inside the WASM file.
images

It would be great to see this happen.

@flipkickmedia flipkickmedia added the feature-request Request for new features or functionality label Feb 15, 2022
@devshgraphicsprogramming
Copy link

devshgraphicsprogramming commented Jul 18, 2022

I'm also interested in this feature, Chrome isn't an IDE and debugging in an IDE is nice.

We're trying to put together an example repo showing how to develop a Native app which can be deployed to the Web using both C++ and Emscripten but also C# and Blazor.
https://github.com/Devsh-Graphics-Programming/GPU-With-C-Sharp-Angular-WASM

@mmarczell-graphisoft
Copy link

Unfortunately the Chrome extension is closed source, 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 write a VSCode extension that integrates with the existing browser debugging experience in VSCode and implements this feature request. (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, vscode-js-debug, the browser being debugged, the existing C++ extension and a theoretical new "Wasm debugger" extension. Is it possible to really implement this in a separate extension? 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 or parts of it to achieve this.)

@connor4312
Copy link
Member

connor4312 commented Nov 18, 2022

The Chromium team is "actively planning to" open source their DWARF wasm debugger, and estimate that happening in the first half of next year. They also reportedly have a prototype VS Code extension. After they get their debugging components open source,I plan to work with them to see if/how that can be integrated into js-debug. I don't know where it would live yet. js-debug does have extensibility mechanisms, so maybe it can plug into those, or we can do some special integration with functionality that lights up when the wasm extension is installed. Lots of options.

@flipkickmedia
Copy link
Author

Unfortunately the Chrome extension is closed source, 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.)

Our idea is write a VSCode extension that integrates with the existing browser debugging experience in VSCode and implements this feature request. (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, vscode-js-debug, the browser being debugged, the existing C++ extension and a theoretical new "Wasm debugger" extension. Is it possible to really implement this in a separate extension? 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 or parts of it to achieve this.)

I have the same concerns. Since this is C++ the responsibility probably sits inside the c++ extensions, or at least this makes the most sense from a users perspective, you're debugging C++, you'd expect it to be inside a C++ extension along with all the other C++ "stuff".

If the Chromium team is planning a release then it kinda makes sense to wait for that and if they created a new extension then the decision about where this sits may have already been made.

I wonder if I can get a pre release of the extension for testing....

@fatfatson
Copy link

it's almost half year, how about it?

@fleabitten232
Copy link

fleabitten232 commented Aug 25, 2023

The (Chrome) extension was finally open-sourced a few days ago as part of 117: https://chromium.googlesource.com/devtools/devtools-frontend/+/refs/heads/main/extensions/cxx_debugging/

No mention of a VSCode extension anywhere.

@toyobayashi
Copy link

Can't wait to use this in vscode!

@connor4312
Copy link
Member

Merging into #1789, somehow I didn't find this issue when I was searching earlier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

7 participants