Skip to content

Add configuration option to issue a signal when the Stop button is clicked in debugger #13827

@thegitworker

Description

@thegitworker

Feature Request

My application terminates via SIGINT or SIGTERM where it can gracefully exit with a shutdown process. This cannot happen with the current debugger as the current stop button implementation immediately terminates (with a SIGKILL?).

I will borrow the proposed solution from another request:

{
  "configurations": [
    {
      "name": "MyApp Debug",
      "type": "cppdbg",
      "request": "launch",
      "program": "${cwd}/myapp",
      "args": ["-d"],
      "stop_action": "SIGKILL", // this would be a new enum-like config option, with values of "SIGKILL", "SIGINT", "SIGTERM", maybe others
    },
  ]
}

That is, to add an option in the launch.json to set the signal that is sent when pressing the stop button.

My current workaround is to use the pause button and then issue the -exec signal SIGTERM to the debugger which will send the signal. This is quite cumbersome when you're debugging and have to start and stop multiple times.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions