Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,36 @@ The following command will ignore subprocesses started by the debugged process.
```


## Debug configuration

For settings passed by a DAP client in a `launch` or `attach` request (for example, in VS Code's `launch.json`), see the [Debug configuration settings](https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings).

### Controlling thread suspension and stepping

Both of the following Boolean settings apply to `launch` and `attach` requests:

| Property | Default | Description |
|---|---|---|
| `stopAllThreadsOnSuspend` | `true` | When `true`, all threads are suspended when a breakpoint is hit. When `false`, only the thread that hit the breakpoint is suspended; other threads keep running. |
| `steppingResumesAllThreads` | `true` | When `true`, a step operation resumes all threads. When `false`, it resumes only the thread being stepped; other suspended threads remain suspended. |

For example, to keep background threads running while another thread is stopped at a breakpoint or being stepped:

```json
{
"name": "Debug with background threads",
"type": "debugpy",
"request": "launch",
"module": "my_module",
"stopAllThreadsOnSuspend": false,
"steppingResumesAllThreads": false
}
```

The debugger's Pause command still suspends all threads, regardless of `stopAllThreadsOnSuspend`. Setting `steppingResumesAllThreads` to `false` does not suspend threads that are already running.

These settings are supplied by the client when it launches or attaches, including when attaching to a process started with the debugpy CLI. They are not supported by the CLI's `--configure-<name>` switches or by `debugpy.configure()`.

## `debugpy` Import usage

For full details, see the [API reference](https://github.com/microsoft/debugpy/wiki/API-Reference).
Expand Down
Loading