Visitar URL original
Add an option to --keep-debug 路 Issue #1351 路 wasm-bindgen/wasm-pack 路 GitHub
Skip to content

Add an option to --keep-debug聽#1351

Open

Description

@connor4312

馃挕 Feature description

With wasm-bindgen/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.

Activity

  1. wvffle commented on Mar 20, 2024

    @wvffle

    +1

  2. TimoWilhelm commented on May 8, 2024

    @TimoWilhelm

    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.

  3. haraldreingruber-dedalus commented on Dec 17, 2024

    @haraldreingruber-dedalus

    Here is a small demo repo, for DWARF debugging:
    https://github.com/haraldreingruber-dedalus/rust-wasm-dwarf-debugging
    Happy to hear if that's useful for anybody, or if something can be improved. Also, PR's welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions