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

Debugging ammo.wasm.wasm using DWARF #405

Open
bbird5490 opened this issue Sep 13, 2022 · 2 comments
Open

Debugging ammo.wasm.wasm using DWARF #405

bbird5490 opened this issue Sep 13, 2022 · 2 comments

Comments

@bbird5490
Copy link

Hi,

I'm tying to look debug ammo.wasm.wasm.

What I did thus far:

  • Enabled generation of DWARF information. I did this by adding the -g option to EMCC_ARGS in CMakeLists.txt and removing the -O3 option.
  • Enabled DWARF debugging in Chrome by setting the option "WebAssembly Debugging: Enable DWARF support"
  • Rebuild ammo.js
  • Copying ammo.wasm.js and ammo.wasm.wasm into my javascript project folder
  • Step into an ammo wasm function.

I don't see the C code as I expected in the Chrome debugger just the WebAssembly

Am I missing something?

Many thanks!

@bbird5490
Copy link
Author

bbird5490 commented Sep 13, 2022

I have now also installed the chrome plugin: https://goo.gle/wasm-debugging-extension

I think I'll need to set a "Path substitutions" using the extension. Anyone tried this for ammo.js?

@qingwabote
Copy link

qingwabote commented Feb 5, 2023

Did you set CMAKE_BUILD_TYPE to Debug in cmake?

set(CMAKE_BUILD_TYPE Debug CACHE STRING "Build Type")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants