configure

debugpy.configure(__properties: dict[str, Any] | None = None, **kwargs) None

Sets debug configuration properties that cannot be set in the “attach” request, because they must be applied as early as possible in the process being debugged.

For example, a “launch” configuration with subprocess debugging disabled can be defined entirely in JSON:

{
    "request": "launch",
    "subProcess": false,
    ...
}

But the same cannot be done with “attach”, because “subProcess” must be known at the point debugpy starts tracing execution. Thus, it is not available in JSON, and must be omitted:

{
    "request": "attach",
    ...
}

and set from within the debugged process instead:

debugpy.configure(subProcess=False)
debugpy.listen(...)

Properties to set can be passed either as a single dict argument, or as separate keyword arguments:

debugpy.configure({"subProcess": False})