I have a minor problem with VSCode IDE (as described by colleague) with our new language. When loading source into a pane it is not possible to immediately set breakpoints graphically. Instead we need to set the BP in the configuration. I suspect this is due to the JIT nature of DWARF generation. If so, how can this be worked around, e.g. by passing some option to wasmtime
? Anybody knows how this is handled for e.g. Rust?
My other theory is that we don't emit DW_AT_main_subprogram
attribute yet, but I doubt that wasmtime
handles that at all.
Maybe we just have to declare the file type .mo
of our language in the IDE as _debuggable_? (Not that I know where to even look for such a setting...)
Thanks in advance for any hints,
cheers,
Gabor
CC @Yury Delendik
@Gabor Greif Yeah, JIT breakpoints are picked up when wasmtime is running. VSCode can be configured to set breakpoint anywhere. See "Allow setting breakpoints in any file" setting. Such breakpoints will "materialize" as soon as JIT code is generated.
Theoretically it is possible to pause at the end of module instantiation and before wasm start function is run, e.g. by adding some breakpoint (at wasm file or wasmtime symbol) definition in ".lldbinit" or in debugger params.
Last updated: Dec 23 2024 at 12:05 UTC