Attaching to Local Process
On this page:
PyCharm makes it possible to attach to a Python process, while running a Python script launched either outside of PyCharm, or inside PyCharm, but NOT in the debug mode.
Attaching to local process
To attach to a local process, follow these general steps:
- Make sure that the desired script is running.
- On the main menu, choose . PyCharm shows the list of running Python processes on a system.
- From the list of Python processes, select the one to connect to, and click
PyCharm starts the debugger session in the Debug tool window.
- Proceed with debugging in the same way as you usually do it in PyCharm (set breakpoints, step through the script, pause and resume the process, evaluate expressions etc.)
- When finished, detach the process: select the menu option or click the Stop the process button of the Debug Tool Window.