vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

[Debugger] Allow an option to only exit debugging once all inferiors have exited

Open randomdude789 opened this issue 4 years ago • 2 comments

Type: Feature Request

Currently, once a single inferior exits, the entire debugging process exits as well. The only workaround available is to detach inferiors manually with gdb commands before they end. This is particularly problematic when gdb's detach-on-fork mode is turned on in complex programs with multiple fork calls.

The proposed solution is to add some user-facing option that will allow individual inferiors to exit without ending debugging. Since multiple-inferior debugging seems to work fine otherwise, I'm hoping this is possible.

randomdude789 avatar Sep 04 '21 02:09 randomdude789

I'm seeing two requests here:

  1. Allow an option to only exit debugging once all inferiors have exited

  2. Add some user-facing option that will allow individual inferiors to exit without ending debugging

For 1, we will need to keep track of new processes that start and if requested stop debugging, we stop all inferior processes.

For 2, we will need to add support for sending a ProcessEvent when a new process starts. e.g. https://github.com/microsoft/vscode-cpptools/issues/4189#issuecomment-528505517

WardenGnaw avatar Sep 06 '21 19:09 WardenGnaw

Hi @WardenGnaw,

Are you considering to add this feature request? It would be quite useful for teaching to undegrads about debugging concurrent programs. Most of these students are uncomfortable with the GDB command line.

rnatella avatar Aug 31 '22 08:08 rnatella

@WardenGnaw sorry for bothering you, but are there any updates regarding this feature? I need this to debug multiple inferiors inside QEMU machine.

kotborealis avatar Nov 01 '22 11:11 kotborealis

Please vote a 👍 on the top comment as we prioritize our work with this issue query: https://github.com/microsoft/vscode-cpptools/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc

WardenGnaw avatar Nov 01 '22 21:11 WardenGnaw