Stream: wasmtime

Topic: VS Code Rust wasmtime debugger?


view this post on Zulip Philippe Parisot (Oct 08 2020 at 19:03):

Sorry if this isn't the right place to ask this.

I took wasmtime for a spin and it's very impressive.

My setup for debugging didn't work sadly and I was curious what was the common way to step through code in wasmtime, if there is one.

I use the C/C++ extension on VS Code with GDB on Linux, works well for Rust native, with wasmtime however I wasn't able to make it work (added "miDebuggerArgs": "wasmtime" in launch.json).

In the command line it works well enough with gdb wasmtime and lldb wasmtime

Wondering if anyone had any success on VS Code. Thanks!

view this post on Zulip Till Schneidereit (Oct 08 2020 at 19:52):

Great to hear that Wasmtime works well for you!

view this post on Zulip Till Schneidereit (Oct 08 2020 at 19:52):

@Yury Delendik is the expert on all things debugging, and I know that he has debugging in VS Code working, and might be able to help

view this post on Zulip Yury Delendik (Oct 08 2020 at 19:56):

just to clarify, @Philippe Parisot are you trying to debug JIT'ed wasm code compiled from C or Rust, and not wasmtime itself?

view this post on Zulip Philippe Parisot (Oct 08 2020 at 19:57):

Yes sorry

view this post on Zulip Philippe Parisot (Oct 08 2020 at 19:57):

To be able to step through rust code running on wasmtime via VS Code

view this post on Zulip Philippe Parisot (Oct 08 2020 at 19:57):

Was wondering if anyone was already able to do this

view this post on Zulip Yury Delendik (Oct 08 2020 at 19:59):

I did it in the past, but you will need specific VSCode extension (don't remember which one, maybe CodeLLDB)

view this post on Zulip Yury Delendik (Oct 08 2020 at 20:00):

args shall include "wasmtime" and "-g" too

view this post on Zulip Yury Delendik (Oct 08 2020 at 20:05):

Screen shot from old demo video

view this post on Zulip Yury Delendik (Oct 08 2020 at 20:05):

Screen-Shot-2020-10-08-at-3.04.46-PM.png

view this post on Zulip Philippe Parisot (Oct 08 2020 at 20:40):

Awesome thanks @Yury Delendik for the quick help!

view this post on Zulip Philippe Parisot (Oct 08 2020 at 20:40):

Gonna give it a shot

view this post on Zulip Gabor Greif (Oct 11 2020 at 15:25):

What @Yury Delendik is describing does work for me (CodeLLDB plugin), albeit with another language, not Rust. On macOS I constantly see https://github.com/bytecodealliance/wasmtime/issues/2127. Normally you have to press the green triangle a few times to get started.

Recently I have started to get strange warnings from wasmtime (HEAD) when running programs using lldb on Darwin. Below is a transcript. ../../llvm/bin/lldb -- target/debug/wasmtime -g sumsX.mo.wasm...

Last updated: Dec 23 2024 at 14:03 UTC