Pycharm debugger doesn't stop at any breakpoint
Answered
I setup a tox project in my pycharm, but it never stop at any breakpoints during debugging. The command it generates at the beginning of the debugging process is
C:\Python27\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 62895 --file "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3\helpers\pycharm\_jb_tox_runner.py"
pydev debugger: process 6628 is connecting
I'm running a luigi pipeline project in windows, pycharm version is 2017.3 community version. I have already restarted pycharm a couple of times.
Appreciate if anyone can advise.
Please sign in to leave a comment.
Same issue with many breakpoints not being hit on 2019.2. Downgrading to 2019.1 which works for me.
macOS 10.12.6
Python 3.7.3
PyCharm 2019.2
Same issue.
Manually reverted from 2019.2 to 2019.1.4 Professional -- solved.
https://www.jetbrains.com/pycharm/download/other.html
We had a similar issue, turning off gevent compatible solved it.
PyCharm 2019.2 (Professional Edition)
Build #PY-192.5728.105, built on July 23, 2019
Runtime version: 11.0.3+12-b304.10 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.14.6
also same issue
but disabling "gevent compatible" works for me
Have the same problem. A workaround I've found it's with the print function. For some reason, only breackpoints in print statements work
Hi,
Please file an issue to our tracker https://youtrack.jetbrains.com/issues/PY and attach idea.log from Help | Show Log in...
Also, add PYCHARM_DEBUG=True environment variable to your run/debug configuration, debug (to reproduce the problem) and provide the whole console output in the description/comments of the issue.
I have the same issue with breakpoints in modules not being hit. Disabling gevent compatible made no difference. Adding a print function as per Ticyolollin's suggestion worked.
My version is:
PyCharm 2019.2.3 (Community Edition)
Build #PC-192.6817.19, built on September 25, 2019
I've made as cut down an example of the problem as I can and submitted an issue:
https://youtrack.jetbrains.com/issue/PY-38347
Same bug for me.
- I was running the 2019.1.4 (Professional Edition) version with MacOS : 10.14.6
- Upgrade to : 2019.2.3 (Professional Edition) do not resolve the problem.
- Downgrade to : 2018.3.7 (PE) do not resolve the problem with an error in the console :
/Users/MY_NAME/VirtualEnv/PROJECT_NAME/bin/python3.8 /Applications/PyCharm.app/Contents/helpers/pydev/pydevd.py --multiproc --qt-support=auto --client 127.0.0.1 --port 49623 --file /Users/MY_NAME/Projects/PROJECT_NAME/manage.py runserver 8000
/Applications/PyCharm.app/Contents/helpers/pydev/_pydevd_bundle/pydevd_resolver.py:127: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if found.get(name) is not 1:
pydev debugger: process 3016 is connecting
yes, i faced these issues again with 2019.2, but i did the following,
at the moment, this way serves my debug needs, so i will use this way until we are sure when Pycharm team fix this up for us...
hope this can help you all to get your debug to work again, if i can't get debug to work, it really feels like i wish to pull my hair out already :) , so i understand the frustration behind it!
Thx for the answer.
But, I have made a git clone (django project) in an other folder, try to put a print with a brekpoint and this not work for me...
I lost my morning and still have this issue...
I paid for a full app licence since many years and I may be, will think about an alternative to jetbrains ?
I suggest you make a ticket - perhaps the magnitude of the problem will become more apparent to Jetbrains if they receive more tickets on the same issue. I made mine here: https://youtrack.jetbrains.com/issue/PY-38347
Yes, understand the frustration, my guessing is that it has to do with the .idea folder or something the debugger is not able to detect but as advice, as u are a paid user, should file a support ticket and hope u find a solution, have a great weekend.
I found a solution !!!
I'm using pyenv and virtualenv so I have downgrade my python version to 3.8.0 to 3.6.9 (maybe the 3.7 will work ?) and create a new venv with the 3.6.9 version.
In the jetbrains settings python interpreter I have use this new venv (with the 3.6.9 version) and now my breakpoints works.
edit : i have set the new venv python interpreter in the latest version of pycharm
My Python version in my newly created virtualenv is 3.6.8 and I have the error unfortunately. It would be interesting to find out if your fix is permanent or temporary and what specifically fixed it - the version change itself or some side effect of making a new venv.
It was working yersteday and works well today, but I miss something in my résolution :
- I have git pull the project in a new folder.
So I think that you have to do :
- update pycharm to the newest version
- create à new folder with the project (without the .idea folder, mine is in the .gitignore file)
- create à fresh venv
- set python interpreter with the fresh venv
i will try to make More tests this afternoon if i can.
Like someone said before I think that is the .idea who break something
If you have time, please could you try with the cut down example I gave in this bug report: https://youtrack.jetbrains.com/issue/PY-38347
JetBrains were able to reproduce the bug from my example according to the bug status which probably means they created everything from fresh (project folder, virtualenv etc.). If your approach somehow makes it work, that would be a very useful piece of information for JetBrains (and me).
I have made a new test :
- git pull my project from gitlab (without .idea folder)
- open the project with pycharm (2019.2.3 - Professional Edition)
- set the python interpreter to my venv with python 3.6.9
it's working well !?
@Baptiste My project in GitHub doesn't have the .idea folder checked in, yet still for me (and the JetBrains support) the issue persists so it would be interesting to see if it works with your PyCharm and venv. JetBrains updated the status on my bug to "open" last week so they are hopefully now working on it: https://youtrack.jetbrains.com/issue/PY-38347
I have updated to PyCharm 2019.2.4 and the bug persists.
Same problem. Following the log:
https://gist.github.com/rhenter/6dc34c05894eea5f8e00a382a32b8bc3
Same problem with 2019.2.5. This is utterly annoying, it's not the first time the IDE has its debugger not working anymore, and it's one of the most important features (IMO at least).
I wonder if it's connecting to the wrong port when starting the debugger...
Hi,
i know, it is frustrating, what i did that works was, i moved the folder of which those python source code to another New folder, and this works!
In my case, it is interested to find out that, there are some folders, which "some" of the source code in it can be debug and some cannot be debugged, and i found one interesting fact is that NOT all the python source code in the folder can't debug but only some files, so i did a test and move those files away, say into another new folder and add it back to my current project and bingo, my breakpoint works again.
So for the sake of debug, i have to temporary move my files out of the folder which version tracked by git and some pycharm file tracker , later once done debugging, i move it back to the original folder.
I sincerely hope this way can help you all. I know the feeling of wasting time not be able to be productive!
I have good and bad news.
Good news is, I found a simpler way to fix the issue: just close PyCharm (or change to another project), delete the project's ".idea/" directory, open the project again and configure it again. I have no idea what the change is, but it worked fine for me, without having to move actual project directories around.
Bad news is, I should have kept a copy of the old directory to compare and have more information on what might have caused the issue, but I just deleted it, sorry guys. Next time I'll try to remember to just keep a backup of the old ".idea/".
Cheers!
Diogo
Diogobaeder @... My cut down example project with the problem in GitHub doesn't have the .idea folder checked in, yet still for me (and the JetBrains support) the issue persists so it would be interesting to see if it works for you: https://youtrack.jetbrains.com/issue/PY-38347
So even if you open the project anew (without a previously existing .idea folder), the issue persists? If that's the case, then it seems like a different issue than mine... for mine, I just deleted that folder and the problem went away.
By any chance do you have "gevent support" enabled in the IDE? If so, try disabling it, and see if that works. At one point this was an issue for me too.
Diogobaeder Thanks for your reply. JetBrains were able to replicate the issue I have (and I didn't give them the .idea folder). I also tried again today deleting the .idea folder but no luck.
I do not have gevent enabled.
If you have time, you can try with the step by step instructions in the ticket: https://youtrack.jetbrains.com/issue/PY-38347 (but understand if you don't have time).
Sure, man. I tried that and updated your ticket, those steps in particular work fine for me. So we'll have to keep looking.
Andrey Lisin from JetBrains has made progress with this issue - see https://youtrack.jetbrains.com/issue/PY-38347#focus=streamItem-27-3825573.0-0 for more information.
Hi all, deleting the .idea folder and the __pycache__ folder and restarting PyCharm solved the problem for me. (Win 10, PyCharm 2019.3 (Professional Edition) Build #PY-193.5233.109, built on November 28, 2019). thanks!