Source-Level Debugging of Compiler-Optimised Code: Ill-Posed, but Not Impossible, https://dl.acm.org/doi/10.1145/3689492.3690047. There's almost no research in this area so it's good to see someone thinking about some of the challenges. I'd like to have seen a discussion of undefined behavior, specifically, since there's a paradox where C programmers are most likely to use debuggers exactly in cases where UB is present, which poses fundamental challenges to source-level debugging.

@pervognsen When writing C/C++, I mostly find myself using a debugger when things go wrong and I'm likely in UB territory. At this point, I'm mostly looking at the disassembly and all of the source/variable mapping of the debugger is a mere convenience, and it's understandable why some things don't work.

When I see people (mostly from or inspired by the Windows gamedev world) talk about continuous usage of debuggers, I do wonder a bit what they're doing with it. Is it a nice interface for getting traces of execution? Do they just want to set a breakpoint in a function for an input doing something they don't understand then step through it until they do understand? Do they actually want to execute newly compiled code from the debugger like a REPL?

@zwarich @pervognsen all of the above? although executing new code is more the wheelhouse of live++ these days. there's no reason to run without a debugger, and most issues are pretty trivial to diagnose when you can inspect up and down the callstack. i believe Per is a big "run to cursor" enjoyer as well, which is like a lite version of live++ if your build time / launch process enables. personally i often end up with a series of breakpoints i manually toggle on and off to trace execution.
@zwarich @pervognsen I would also add that it's not necessarily a *nice* interface for getting traces, at least visual studio can be kind of a big pita. but it's the least invasive version when you don't want to paste 500 tracepoints in your code and then manually filter through a log file. (i do that a lot too, but it's generally nice to avoid if possible) sometimes i also use profiling tools as a live inspectable log as well, since you can usually record arbitrary values into the trace.