Skip to content

Commit ce2b79a

Browse files
authored
Add instructions to deactivate sp debugging (#94)
* Add instructions to deactivate sub process debugging
1 parent e4511d9 commit ce2b79a

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,39 @@ If you intend to actively develop CubitPy, please make sure to install the `pre-
7777
```bash
7878
pre-commit install
7979
```
80+
81+
## Debugging in VS Code and PyCharm
82+
83+
When debugging, IDEs may try to attach to subprocesses, which can cause issues. The instructions below show how to disable this behavior in VS Code and PyCharm.
84+
85+
### VS Code
86+
87+
To prevent the debugger from attaching to subprocesses, add the following to your `.vscode/launch.json`:
88+
89+
```json
90+
{
91+
// Use IntelliSense to learn about possible attributes.
92+
// Hover to view descriptions of existing attributes.
93+
"version": "0.2.0",
94+
"configurations": [
95+
{
96+
"name": "Python: Launch current file",
97+
"type": "debugpy",
98+
"request": "launch",
99+
"program": "${file}", // Launches the currently open file
100+
"console": "integratedTerminal", // or "externalTerminal" if needed
101+
"subProcess":false, // Disables debugging for subprocesses and libraries
102+
}
103+
]
104+
}
105+
```
106+
107+
### PyCharm
108+
109+
To disable subprocess debugging:
110+
111+
1. Go to **File > Settings**
112+
2. Navigate to:
113+
**Build, Execution, Deployment > Python Debugger**
114+
3. Uncheck:
115+
**Attach to subprocess automatically while debugging**

0 commit comments

Comments
 (0)