-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Dwarf doesnt load source files #13486
Comments
@amarav Sorry to hear it doesn't work. Did you install the extension and enable the flag as per instructions at https://goo.gle/wasm-debugging-with-dwarf? |
Actually, this is probably the reason - as the instructions say, you need Chrome Canary at the moment. I don't think we're in Beta yet. |
Beta channel should be fine! Did you make sure to enable the DWARF Debugging experiment in DevTools? (Gear icon > Experiments) |
@pfaffe You're right! Missed to enable Dwarf support in DevTools. Could not load content for wasm://wasm/main.cpp (HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME) I'm unable to see the contents of the source files now. Any inputs to resolve this? |
You're hitting a corner case that we assumed would be quite rare in the wild. We have special treatment for when source files have relative paths in the debug symbols. In that case, we treat the paths as relative to the base URL. In your case, that base URL is a wasm:// origin, which are fake URLs assigned by the engine when modules are created from a buffer instead of through the streaming APIs. We generally discourage using the ArrayBuffer APIs for performance reasons. Besides switching to streaming APIs, here's how you get out of that situation. The web.dev blog post briefly talks about remapping source file paths. Path substitutions match prefixes of your source file paths and replace it. For example, you could replace |
May I know Where i could do this Path substitution? Is it in devTools? In my case i need to substitute wasm://wasm/ with file:///C: is it? |
The setting is in the extension's options page. You navigate to |
Thanks @pfaffe but doesnt work yet |
The left-hand side should just read The substitutions are applied to the (relative) paths that are in the debug symbols, not to the complete URLs that are shown in DevTools. So what you want to do is to replace the |
@pfaffe Thanks a ton! File contents load now. |
I'm trying to debug my c++ application usind Dwarf on Chrome Version 89.0.4389.47 (Official Build) beta (64-bit)
But, Unable to see the source files in the Inspect window
Need help to resolve it
This is the option i use
emcc --preload-file rdf_cpp/resources/Resources.tar -I include -s USE_LIBPNG=1 -s ALLOW_MEMORY_GROWTH=1 -s WASM=1 librendercore.a main.cpp rdf_cpp/.cpp rdf_cpp/scripts/.cpp -o rendercoreweb.js -o rendercoreweb.html -g -fdebug-compilation-dir=".."
In the console/sources window, i can see only the .html,.js and .wasm file.
Expected: Source files to debug
The text was updated successfully, but these errors were encountered: