()
| 5189 | assert writer.process is not None |
| 5190 | |
| 5191 | def attach(): |
| 5192 | attach_pydevd_file = os.path.join(os.path.dirname(pydevd.__file__), "pydevd_attach_to_process", "attach_pydevd.py") |
| 5193 | subprocess.call( |
| 5194 | [ |
| 5195 | sys.executable, |
| 5196 | attach_pydevd_file, |
| 5197 | "--pid", |
| 5198 | str(writer.process.pid), |
| 5199 | "--port", |
| 5200 | str(writer.port), |
| 5201 | "--protocol", |
| 5202 | "http_json", |
| 5203 | "--debug-mode", |
| 5204 | "debugpy-dap", |
| 5205 | ] |
| 5206 | ) |
| 5207 | |
| 5208 | threading.Thread(target=attach).start() |
| 5209 |