PyCharm "Attach to local process" does nothing

Completed

I am trying to use PyCharm 2017.3 to attach to some Python processes running on local machine. My understanding it would open up the debugger window displaying the process is attached, show the call stack and let me add breakpoints. But I got nothing -- no response, no debugger console pop up, as if nothing happened.

Anything setup needed for this feature to work?

I am running on Ubuntu 16.04 64 bits with Python 3.6.3 and pyenv.

0
1 comment
Avatar
Permanently deleted user

I made it work with the following three things after some googling and test.

1. Fix the `ptrace` permission problem as described in http://askubuntu.com/questions/41629/after-upgrade-gdb-wont-attach-to-process
2. The Python executable under `pyenv` is a script rather than a real executable. I switched to Ubuntu's own Python 3.5. Deleted the .idea subfolder in the project directory and .PyCharm2017.3 in home directory. After reopen the project set the Project Interpreter to the same Python 3.5
3. Ran `$ sudo apt install python3-dbg python3-dev`. Not sure if this step is necessary, but I did it to make GDB be able to run the `py-*` command as well when searching for an alternative

0

Please sign in to leave a comment.