alt.hn

12/9/2025 at 9:19:37 PM

Qt, Linux and everything: Debugging Qt WebAssembly

http://qtandeverything.blogspot.com/2025/12/debugging-qt-webassembly-dwarf.html

by speckx

12/10/2025 at 12:48:25 AM

What's interesting here is that you can now debug WebAssembly applications with full C++ source-level debugging directly in Chrome, complete with breakpoints, variable inspection, and step-through debugging, just like a native desktop app.

What makes this particularly interesting is the technology stack: Emscripten embeds DWARF debugging symbols (the same format used for native Linux binaries) directly into WebAssembly binaries. A Chrome browser extension then reads these embedded symbols and reconstructs the original C++ source code view in the DevTools, mapping the compiled WebAssembly back to your Qt C++ source with full directory paths intact.

All of this would have seemed impossible not long ago.

by N_Lens

12/10/2025 at 7:05:32 AM

> directly in Chrome

So it doesn't work in any other browser? More incentive for those web 4.0 or 5.0, i lost count, "experts" to only support Chrome?

by nottorp

12/10/2025 at 10:06:26 AM

Of course, because outside Apple's iDevices ecosystem what you have now is the ChromeOS Platform, with a standards body that basically rubber stamps what Google and everyone shipping Chrome forks want.

It has stopped being the Web long time ago.

by pjmlp

12/10/2025 at 8:42:13 AM

It's up to the other browser vendors to implement similar extensions. It's just that most people involved with WASM seem to have ended up at Google (see Emscripten which moved to Google when Mozilla lost interest in innovating).

by flohofwoe

12/10/2025 at 8:27:11 AM

In VSCode it's quite a bit more convenient since you don't need to faff around with Chrome extensions or the browser dev tools and debugging happens right in VSCode.

It still requires some tinkering with launch.json to glue a couple of VSCode extensions together though, but the result is that I can simply press F5 in VSCode to step into my C/C++ code with the debuggee running remotely in Chrome - e.g. exactly the same workflow like a native debug session:

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

by flohofwoe

12/9/2025 at 10:22:19 PM

Very useful. It would be great for the browser become the cross-platform application target. I've been eagerly waiting for Qt WebAssembly to mature.

by em3rgent0rdr

12/9/2025 at 10:44:45 PM

> It would be great for the browser become the cross-platform application target.

This is the kind of thing that I feel is very nice and terrible at the same time. Yes it is convenient but it is also such a complex piece of software, it's sad that it is required to run gui apps. Ok, it may not be required yet per say, but I have mixed feelings about this direction.

by bionsystem

12/9/2025 at 11:25:33 PM

Maybe not the browser per se, but a WASI runtime

by mkoubaa

12/10/2025 at 12:21:31 AM

Or both the browser and wasi. As I am doing with exaequOS

by baudaux

12/10/2025 at 2:27:31 AM

I think this kind of thing could be really useful for a project I'm building.

by mkoubaa

12/10/2025 at 7:02:04 AM

What is your project ?

by baudaux

12/10/2025 at 11:42:34 PM

I'll email you over the weekend

by mkoubaa

12/9/2025 at 11:57:47 PM

I feel like this article is severely flawed.

Debugging wasm qt apps is not hard at all. Yes, as the article says, you need to build the code in debug mode, this isn’t unusual.

If you use qtcreator, it’s, and I hate this word, trivial. Most of the work comes from setting up the qt kit in qtcreator… which takes about 5 minutes.

Breakpoints just work. Debugging just works. Everything… works.

by irishcoffee

12/10/2025 at 12:47:41 AM

I think you are disconnected from the pain of debugging in the past. The fact that it all works so seamlessly together now is a bit fascinating and astounding.

by N_Lens

12/10/2025 at 7:04:39 AM

Well anyone who worked on native apps has had seamlessly working debuggers for ages :)

by nottorp

12/10/2025 at 12:56:19 PM

Outside Web development, debugging has been a non issue for at least 30 years.

by pjmlp

12/10/2025 at 12:50:28 AM

I am not at all disconnected, but I understand why you might say that.

by irishcoffee

12/10/2025 at 8:33:42 AM

> Breakpoints just work. Debugging just works. Everything… works.

...and you're actually debugging the WASM executable which runs in a browser and not a native version of the application?

Not that it matters most of the time, I also do 99% of my debugging session on the native target. But for debugging problems that only happen in the WASM version actually debugging the WASM version makes a lot of sense, and that was anything but trivial not too long ago (if QtCreator can actually pull off a remote debugging session where the debuggee runs in Chrome then kudos to QtCreator).

by flohofwoe

12/11/2025 at 12:53:34 AM

IIRC, and I’ll try and check tomorrow, what I was able to do in the past was set breakpoints in both qtcreator and a browser, and step through both. I believe there was a web dev tools tab that showed the c++. I’ll try and verify.

I’m not a professional webdev, I was just messing around with qt+wasm for a few weeks a little while ago.

by irishcoffee

12/10/2025 at 11:20:53 AM

> If you use qtcreator, it’s, and I hate this word, trivial. Most of the work comes from setting up the qt kit in qtcreator… which takes about 5 minutes.

And as QtCreator is first-class citizen for everything related to Qt, you'll have all the Qt types correctly resolved/unrolled/displayed/annotated by gdb, which makes your debugging experience a lot, lot more convenient.

by fransje26

12/10/2025 at 12:17:31 PM

You don’t need to use qt anything at all. It’s just an IDE, but yes qt is a first class citizen, it works well.

by irishcoffee

12/10/2025 at 9:12:58 PM

I wish licensing restrictions weren't holding back more widespread adoption of qt wasm.

by LeSaucy

12/9/2025 at 10:56:20 PM

Is anyone using Qt for developing Mac apps these days? How is the integration after the recent Mac UI refresh?

by oblio

12/10/2025 at 12:07:42 AM

Qt for macOS maintainer here.

We've tweaked our styles to take the new design metrics into account, and fixed or worked around issues where we've seen them. We don't integrate with NSGlassEffectView and friends yet. If you find any issues in recently released version of Qt 6.10, 6.8 or 6.5, please report them upstream, thanks!

See also https://www.qt.io/blog/qt-on-macos-26-tahoe

by torarnv

12/10/2025 at 10:01:12 AM

Ooooh, fancy :-)

Thank you for replying, glad to hear that Qt is staying on top of the game, I know it's a tough job.

by oblio

12/10/2025 at 12:18:35 AM

Yes! I'm developing my note-taking app[1] for macOS and now working on a mobile version.

[1] https://get-notes.com

by rubymamis