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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an option to --keep-debug #1351

Open
connor4312 opened this issue Nov 30, 2023 · 2 comments
Open

Add an option to --keep-debug #1351

connor4312 opened this issue Nov 30, 2023 · 2 comments

Comments

@connor4312
Copy link

馃挕 Feature description

With rustwasm/wasm-bindgen#2389, DWARF symbols work in wasm-bindgen when --keep-debug is passed. However, this cannot be passed from the wasm-pack interface (as far as I know)

馃捇 Basic example

Currently one manually has to do

cargo build --target wasm32-unknown-unknown &&  wasm-bindgen --keep-debug --web --out-dir pkg ./target/wasm32-unknown-unknown/

It would be better to add some wasm-pack build --keep-debug, or even make that the default for dev builds.

@wvffle
Copy link

wvffle commented Mar 20, 2024

+1

@TimoWilhelm
Copy link

While this is disabled by default in the Cargo.toml Configuration it can be enabled by adding the following to your Cargo.toml and running with the --dev profile:

[package.metadata.wasm-pack.profile.dev.wasm-bindgen]
dwarf-debug-info = true

if you run it with RUST_LOG=info wasm-pack build you should see that it adds the --keep-debug flag to the wasm-bindgen command.

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

Successfully merging a pull request may close this issue.

3 participants