Skip to content

Debugging: add integration test with LLDB and some minor tweaks.#12856

Merged
fitzgen merged 1 commit into
bytecodealliance:mainfrom
cfallin:debug-integration-test
Mar 27, 2026
Merged

Debugging: add integration test with LLDB and some minor tweaks.#12856
fitzgen merged 1 commit into
bytecodealliance:mainfrom
cfallin:debug-integration-test

Conversation

@cfallin
Copy link
Copy Markdown
Member

@cfallin cfallin commented Mar 27, 2026

This PR adds:

  • An integration-test that runs LLDB against the Wasmtime CLI to verify basic debugging functionality, similar to the existing native-debug tests.

  • A CI job that runs the above in CI.

  • Some minor tweaks to the gdbstub debugger design:

    • Rather than the initial single-step to get to the first Wasm instruction where module(s) will be instantiated into the store and visible to the debugger, we pre-register modules with the store eagerly. This avoids the slightly hacky flow and also is a preparation step for wasmtime serve debugging, where we can't single-step into execution eagerly (because execution doesn't start at all until an HTTP request arrives).
    • Add a separate message-printing path for "debugger info messages", allowing us to print the "debugger is listening on " message without inheriting stderr for the whole debugger component environment. This message is necessary for the above integration test (it parses the message to determine when the debuggee is ready).

@cfallin cfallin requested review from a team as code owners March 27, 2026 17:19
@cfallin cfallin requested review from fitzgen and removed request for a team March 27, 2026 17:19
This PR adds:

- An integration-test that runs LLDB against the Wasmtime CLI to
  verify basic debugging functionality, similar to the existing
  native-debug tests.

- A CI job that runs the above in CI.

- Some minor tweaks to the gdbstub debugger design:
  - Rather than the initial single-step to get to the first Wasm
    instruction where module(s) will be instantiated into the store
    and visible to the debugger, we pre-register modules with the
    store eagerly. This avoids the slightly hacky flow and also is a
    preparation step for `wasmtime serve` debugging, where we can't
    single-step into execution eagerly (because execution doesn't
    start at all until an HTTP request arrives).
  - Add a separate message-printing path for "debugger info messages",
    allowing us to print the "debugger is listening on <PORT>" message
    without inheriting stderr for the whole debugger component
    environment. This message is necessary for the above integration
    test (it parses the message to determine when the debuggee is ready).
@cfallin cfallin force-pushed the debug-integration-test branch from 252c166 to f41d4fd Compare March 27, 2026 17:28
Copy link
Copy Markdown
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@fitzgen fitzgen added this pull request to the merge queue Mar 27, 2026
Merged via the queue into bytecodealliance:main with commit 856fb27 Mar 27, 2026
47 checks passed
@cfallin cfallin deleted the debug-integration-test branch March 27, 2026 20:16
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 this pull request may close these issues.

2 participants