frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Ask HN: DDD was a great debugger – what would a modern equivalent look like?

40•manux81•13h ago
I’ve always thought that DDD was a surprisingly good debugger for its time.

It made program execution feel visible: stacks, data, and control flow were all there at once. You could really “see” what the program was doing.

At the same time, it’s clearly a product of a different era:

– single-process

– mostly synchronous code

– no real notion of concurrency or async

– dated UI and interaction model

Today we debug very different systems: multithreaded code, async runtimes, long-running services, distributed components.

Yet most debuggers still feel conceptually close to GDB + stepping, just wrapped in a nicer UI.

I’m curious how others think about this:

– what ideas from DDD (or similar old tools) are still valuable?

– what would a “modern DDD” need to handle today’s software?

– do you think interactive debugging is still the right abstraction at all?

I’m asking mostly from a design perspective — I’ve been experimenting with some debugger ideas myself, but I’m much more interested in hearing how experienced engineers see this problem today.

Comments

chrsw•13h ago
Something like this maybe:

https://whitebox.systems/

Doesn't seem to meet all your desired features though.

manux81•13h ago
Yes, that’s a good example — thanks for the link. Tools like this seem very strong at visualizing and exploring state, but they still tend to stay fairly close to the traditional “pause and inspect” model. What I keep struggling with is understanding how a particular state came to be — especially with concurrency or events that happened much earlier. That gap between state visualization and causality feels hard to bridge, and I’m not sure what the right abstraction should be yet.
chrsw•13h ago
Here's another one

https://scrutinydebugger.com/

It's for embedded systems though, which is where I come from. In embedded we have this concept called instruction trace where every instruction executed with the target gets sent over to the host. The host can reconstruct part of what's been going on in the target system. But there's usually so much data, I've always assumed a live view is kind of impractical and only used it for offline debugging. But maybe that's not a correct assumption. I would love to see better observability in embedded systems.

omnicognate•4h ago
Sounds like you want a time travel debugger, eg. rr.

Sophisticated live debuggers are great when you can use them but you have to be able to reproduce the bug under the debugger. Particularly in distributed systems, the hardest bugs aren't reproducible at all and there are multiple levels of difficulty below that before you get to ones that can be reliably reproduced under a live debugger, which are usually relatively easy. Not being able to use your most powerful tools on your hardest problems rather reduces their value. (Time travel debuggers do record/replay, which expands the set of problems you can use them on, but you still need to get the behaviour to happen while it's being recorded.)

Veserv•4h ago
Sounds like you want time travel debugging [1]. Then you can just run forwards and backwards as needed and look at the full evolution of state and causality. You usually want to use a integrated history visualization tool to make the most of that since the amount of state you are looking at is truly immense; identifying the single wrong store 17 billion instructions ago can be a pain without it.

[1] https://en.wikipedia.org/wiki/Time_travel_debugging

gabriela_c•2h ago
This doesn't sound like a particularly difficult problem for some scenarios.

It's definitely convoluted as it comes to memory obtained from the stack, but for heap allocations, a debugger could trace the returns of the allocator APIs, use that as a beginning point of some data's lifetime, and then trace any access to that address, and then gather the high-level info on the address of the reader/writer.

Global variables should also be trivial (fairly so) as you'll just need to track memory accesses to their address.

(Of course, further work is required to actually apply this.)

For variables on the stack, or registers, though, you'll possibly need heuristics which account for reusage of memory/variables, and maybe maintain a strong association with the thread this is happening in (for both the thread's allocated stack and the thread context), etc.

martijnvds•5h ago
printf("Got here, x=%u"\n", x);
jeffwass•4h ago
“The most effective debugging tool is still careful thought, coupled with judiciously placed print statements.”

- Brian Kernighan

db48x•3h ago
Although that was true at the time, it was before the creation of modern omniscient debuggers like Pernosco (<https://pernos.co/>).
BoredomIsFun•1h ago
Very convenient to use LLMs for the that "Please add debug fprintf(stderr, {print var x y here})". The "please comment out the debug fprintfs"
goku12•46m ago
I'm not too offended by this answer. We all reach for it before we seriously think about the debugger. But debugging should be treated as a specialist skill that's almost as complex as programming, and just as empowering. There are two ways I can think of right away, in which the mastery of debuggers can enrich us.

The first is that it gives you an unparalleled insight into the real stuff behind the scenes. You'll never stop learning new things about the machine with a debugger. But at the minimum, it will make you a much better programmer. With the newly found context, those convoluted pesky programming guidelines will finally start to make sense.

The second is that print is an option only for a program you have the source code for. A debugger gives you observability and even control over practically any program, even one already in flight or one that's on a different machine altogether. Granted, it's hard to debug a binary program. But in most cases on Linux or BSD, that's only because the source code and the debugging symbols are too large to ship with the software. Most distros and BSDs actually make them available on demand using the debuginfod software. It's a powerful tool in the hands of anyone who wishes to tinker with it. But even without it, Linux gamers are known to ship coredumps to the developers when games crash. Debugging is the doorway to an entirely different world.

buster•5h ago
Domain driven design?
reidrac•5h ago
I assume is this one https://www.gnu.org/software/ddd/

I used it back in Uni, in 98, and it really helped me to understand debuggers. After it, even using gdb made sense.

flurdy•11m ago
I was so confused. Why is domain driven design especially good for debugging? I guess context is bound within the models... And then all the other comments were just talking about debugging tools. Glad I was not the only one.
markhahn•4h ago
Linaro (need Allinea) DDT?
galkk•4h ago
I haven’t touched in a while, but Visual Studio’s (standalone, not code) debugger was very cool.

Also rr is impressive in theory, although it never worked on codebases that I worked on.

superdisk•4h ago
This is a legitimate question but this was clearly generated using an LLM.

To add something constructive, this demo represents an amazing ideal of what debugging could be: https://www.youtube.com/watch?v=72y2EC5fkcE

TheRoque•4h ago
Maybe you can have a look at RadDbg [0], as I understand the project has been bought by Epic Games recently. The goal is to make a performant debugger, from what I understand its target audience is mostly game developers, but you can use it for other programs obviously. You can see a talk of the core developer and his vision here: https://www.youtube.com/watch?v=_9_bK_WjuYY

Sadly it's windows only yet, but they have plans to port it to other platforms.

- [0]: https://github.com/EpicGamesExt/raddebugger

mort96•4h ago
The readme talks about plans for Linux support, but I'm guessing that's no longer on the table after the Epic acquisition? Sweeney is the single most publicly anti-Linux CEO I'm aware of.
nottorp•3h ago
Do you expect an IAP peddler to support free software?
mort96•3h ago
Yes actually: plenty of companies don't care where the money comes from, they're happy as long as there's money. Unity, the other big ad- and IAP-peddling game engine company, has pretty good Linux support.

It's weird for a company to explicitly say, "if you use this one operating system you can go F yourself, we don't want your money". (Note: this is not the same as saying "we only officially support Windows at this time, sorry". There's seething hatred in Sweeney's words.)

nottorp•3h ago
I suppose Apple bribed him to support Macs. Who's going to bribe him to support Linux, RedHat? Canonical?
password4321•48m ago
Valve does.
hyperbolablabla•1h ago
AFAIK, RAD was acquired by Epic before Ryan began working on the Linux port
DeathArrow•4h ago
I am pretty happy with the debugger from Visual Studio.
apaprocki•4h ago
Check out Binary Ninja if you haven’t. Especially if you have large binaries!
Agingcoder•4h ago
Pernosco

Blows everything else out of the water.

https://pernos.co/ ( I’m not affiliated to them in any way, just a happy customer)

w4yai•2h ago
Seems like IDA Pro does the same but 10x better
cinntaile•2h ago
It doesn't sound like you have even used it so "seems like" is doing a lot of heavy lifting here.
uyar•4h ago
My background is in teaching C programming at the university level and DDD was very helpful there, although not very comfortable to use. For years, I've looked for a replacement and finally found Seer and was very happy with it.

https://github.com/epasveer/seer

Interactive debugging is definitely useful when teaching but obviously teaching is a different context. But Seer is not an educational tool and I believe it will hold up in other cases as well.

w4rh4wk5•3h ago
Have you also tried KDbg, and if so, what's the reason for picking seer over KDbg?
uyar•1h ago
I remember trying it but I couldn't use it, I don't remember exactly why now. The KDE dependencies might have been a problem to have the students install it on their computers but I also remember not being able to use the app properly. I tried to test it out again just now but couldn't find a binary download and couldn't compile myself.
anthk•4h ago
Radare and friends maybe. For sure it has some graph-like options as DDD had where you could graphically see everything.

Most RE tools today will integrate a debugger (or talk to gdb).

w4rh4wk5•3h ago
May I recommend this episode of The Stand Up podcast with Ryan Fleury as guest, who is the driving force behind the rad debugger.

https://www.youtube.com/watch?v=O-3gEsfEm0g

Casey also makes a good point here on why printf-debugging is still extremely popular.

delaminator•3h ago
Plan 9's acid.
MichaelRo•2h ago
Modern equivalent, working on Linux with remote connection from Visual Studio Code is LLDB.

Takes some effort to configure it but beats "printf" (i.e. logging) in the end.

michalsustr•2h ago
What are you using as a Rust debugger?
BoredomIsFun•1h ago
I think for Unix-likes, a good old TUI based like Turbo Debugger would be very useful.
flohofwoe•32m ago
I always point to the Metal-API debugger in Xcode for what I'd want a CPU debugger to look like, visualizing dependencies and dataflows with an actual graphical UI, letting me view data as something else than just hex dumps (e.g. as image or 3D mesh), etc... etc...

Of course the CPU side usually lacks semantics to automatically create data visualizations (while modern 3D APIs have enough context to figure out data dependencies and data formats), and that would be the "interesting" part to solve - e.g. how to tunnel richer debug information from the programming language to the debugger.

Also there's a middle ground of directly adding a realtime runtime debugging UI to applications via something like Dear Imgui (https://github.com/ocornut/imgui/) which is at least extremely popular in game development - and in this case it's trivial to provide the additional context since you basically develop the debugging system alongside the application.

PS: I'd also like a timeslider that "just works", e.g. travelling back to a previous state, taking snapshots and exploring different "state forks". And of course while at it, live editing / hot code reloading, so that there is no difference between development and debugging session, both merge into the same workflow.

Lwerewolf•16m ago
FoundationDB's approach - look up their testing framework.

I've worked in a company that, for all intents and purposes, had the same thing - single thread & multi process everything (i.e. process per core), asserts in prod (like why tf would you not), absurdly detailed in-memory ring buffer binary logs & good tooling to access them plus normal logs (journalctl), telemetry, graphing, etc.

So basically - it's about making your software debuggable and resilient in the first place. These two kind of go hand-in-hand, and absolutely don't have to cost you performance. They might even add performance, actually :P

Tell HN: I cut Claude API costs from $70/month to pennies

32•ok_orco•11h ago•14 comments

Ask HN: DDD was a great debugger – what would a modern equivalent look like?

40•manux81•13h ago•40 comments

Ask HN: What software / applications can you now build thanks to AI

5•zarathustra333•7h ago•1 comments

Ask HN: Gmail spam filtering suddenly marking everything as spam?

208•goopthink•1d ago•122 comments

Ask HN: Freelance Qt C++

2•shchess•6h ago•1 comments

Ask HN: Running UPDATEs in production always feels heavier than it should

3•Lucy_Bai•6h ago•3 comments

Ask HN: What's the current best local/open speech-to-speech setup?

253•dsrtslnd23•3d ago•61 comments

Ask HN: Do you have any evidence that agentic coding works?

456•terabytest•5d ago•452 comments

Compiled Node.js 18 from source on jailbroken iPhone to run Claude Code

2•BryanTheCynic•9h ago•0 comments

Ask HN: Some great launch videos in recent times?

2•nemath•10h ago•0 comments

Ask HN: What are the most significant man-made creations to date?

15•George97•22h ago•23 comments

Tell HN: 2 years building a kids audio app as a solo dev – lessons learned

136•oliverjanssen•4d ago•79 comments

SHDL – A Minimal Hardware Description Language Built from Logic Gates

2•rafa_rrayes•11h ago•1 comments

I'm posting this from a memory safe web browser

38•pizlonator•15h ago•2 comments

Ask HN: Why is cursor / Claude Code is so bad at generating readmes?

4•yakshithk_•10h ago•3 comments

Ask HN: Why are so many rolling out their own AI/LLM agent sandboxing solution?

32•ATechGuy•5d ago•14 comments

Ask HN: Have we confused efficiency with "100% utilization"?

27•nickevante•1d ago•20 comments

Ask HN: What usually happens after a VC asks for a demo?

12•stijo•1d ago•6 comments

Ask HN: May an agent accept a license to produce a build?

26•athrowaway3z•1d ago•48 comments

Ask HN: How to reach out to a commenter under an old submission (nick_m)?

4•jsumn•22h ago•4 comments

Ask HN: Revive a mostly dead Discord server

21•movedx•5d ago•29 comments

Ask HN: Career transition question – assistance, MLOps guidance

4•Pierre_Esteves•1d ago•0 comments

Ask HN: Why does the number of datasets on data.gov vary so much?

8•akudha•1d ago•4 comments

Ask HN: Thinking about memory for AI coding agents

7•hoangnnguyen•2d ago•9 comments

Ask HN: What are some good unintuitive statistics problems?

6•ronbenton•1d ago•7 comments

Ask HN: Rust and AI builders interested in local-first, multi-agent systems?

3•cajazzer•1d ago•8 comments

Ask HN: Which common map projections make Greenland look smaller?

19•jimnotgym•5d ago•17 comments

Ask HN: How to redeem a gift card without risking lock-out?

6•magnetic•1d ago•6 comments

Ask HN: Weekend Social: Top two programming languages and what they can borrow?

3•susam•1d ago•7 comments

Ask HN: Do you "micro-manage" your agents?

7•xinbenlv•2d ago•8 comments