Hacker News new | ask | show | jobs
by flohofwoe 8 days ago
> as it's not possible really to debug a WASM application

...as others have said, this is a solved problem and has been for quite a while:

https://marketplace.visualstudio.com/items?itemName=ms-vscod...

I might even go that far and say that this solution is on average more robust and more responsive than debugging native code in Xcode.

2 comments

Hmm I never could get the DWARF debug information to hook up properly, must give this a try next time I need to return to the topic.

If you don't mind - what's your specific setup when debugging Sokol, I might start from replicating that workflow?

Basically this, just with code-generated launch.json which starts a regular node https server (eg fewer extensions needed than in this blog post):

https://floooh.github.io/2023/11/11/emscripten-ide.html

> Last updated 27/09/2023

And only "works" for specific languages.

The extension is "feature complete" and works. Why should it need updates when it's not broken?

It should also work for all compiler toolchains that generate DWARF debug info, which is pretty much standard across all compiled languages, otherwise gdb or lldb couldn't be used either with those languages (Microsoft of course does its own thing, as is tradition, but its not like msvc supports wasm output in the first place - Blazor oth appears to support wasm debugging in VS and VSCode)

Microsoft isn't the only platform doing its own thing, although this is irrelevant for this specific case.

Given how bad most of WebAssembly tooling still is to this day, versus native languages, I was kind of sceptic.