delve icon indicating copy to clipboard operation
delve copied to clipboard

Wasm target?

Open justinclift opened this issue 7 years ago • 5 comments
trafficstars

Started playing around with wasm, using the new Go 1.11 js/wasm target. eg GOOS=js GOARCH=wasm

One drawback there is the complete lack of any kind of debugger.

Thinking about how that could be solved, would the optimal approach be to add some kind of support to Delve for (say) OS=js and ARCH=wasm?

justinclift avatar Aug 29 '18 11:08 justinclift

Reading this it sounds like there is no way to write a debugger for wasm yet.

aarzilli avatar Aug 29 '18 11:08 aarzilli

Ahhh yeah, it is kind of light on details:

Debuggers:

    * Basic browser integration can be done through source map support.
    * Full integration for languages like C++ require more standardization effort on
      debugging information format as well as permissions for interrupting programs,state,
      inspecting their modifying their state.
    * Debug information is better delivered on-demand instead of built-in to a WebAssembly
      module.

Sounds like it's depending on the main wasm developers to getting something workable happening there.

Thanks @aarzilli. :smile:

justinclift avatar Aug 29 '18 11:08 justinclift

This looks like the right place to keep an eye on:

https://github.com/WebAssembly/debugging

The charter of that group: https://github.com/WebAssembly/debugging/blob/master/Charter.md

justinclift avatar Aug 29 '18 11:08 justinclift

This looks like the matching in progress debugging standard doc:

And some research by (I'm guessing) a member of the Debugging working group:

Hmmm, with initial exploratory implementation for Rust:

  • https://github.com/yurydelendik/old-man-sandbox/tree/master/rust-wasm-hey

justinclift avatar Sep 01 '18 15:09 justinclift

Has there been any progress towards debugging remote wasm sessions - like "dlv attach" ?

paralin avatar Jan 05 '22 00:01 paralin