[Lldb-commits] [lldb] Support single stopped event in lldb-dap (PR #98568)
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 15 11:17:21 PDT 2024
clayborg wrote:
This feature hides what other threads are doing when you stop and any other threads that stop for a reason can be hidden from the user. For example if we have 5 threads stop at a breakpoint, but we only report 1 for thread 1, do we see the right stop reason for the threads 2-5 in the UI? Can we tell they stopped at a breakpoint? Or we are pretending that they just stopped for no reason as far as the IDE is concerned? Do we need to type "thread list" in the debug console to see the real stop reasons?
My main issue with this is lets say you set a breakpoint somewhere and this breakpoint is important and if you hit this breakpoint then you have found your bug. But you are stepping in another thread with this feature enabled. You will never know that this breakpoint was hit unless it eventually causes a fatal error. So it is easy to miss important breakpoints.
That being said, Jeffrey's reason for this patch is the VS Code IDE doesn't do a great job at showing the current thread when you might be debugging some code that multiple threads are executing at the same time. You see a mess of thread PC indicators and the colors don't clearly tell you which one is your current thread and it becomes confusing for users. So I am not opposed to this feature as long as the description for the launch config option has a big warning in the description.
https://github.com/llvm/llvm-project/pull/98568
More information about the lldb-commits
mailing list