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. 

50 comments
Comment actions Permalink

Hello,

Could you please share idea.log ("Help | Show Log in...") after reproducing the issue? You could use any online service or our FTP: https://intellij-support.jetbrains.com/hc/en-us/articles/207241235-Reporting-performance-problems

0
Comment actions Permalink

Hi Yaroslav, 

Thanks for responding. I have uploaded the file into your site using https://uploads.services.jetbrains.com. The file name is "idea - guoming - 20180308.log". 

 

0
Comment actions Permalink

Could you please set environment variable PYCHARM_DEBUG=True (you can do it in Run configuration) and provide us a console output?

0
Comment actions Permalink

Yaroslav, 

Here is the logs. Note that I have masked information that's specific to our project.

 

Testing started at 9:31 AM ...
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 49717 --file "C:\Program Files\JetBrains\PyCharm Community Edition 2017.3\helpers\pycharm\_jb_tox_runner.py"
Using Cython speedups
Executing file C:\Program Files\JetBrains\PyCharm Community Edition 2017.3\helpers\pycharm\_jb_tox_runner.py
arguments: ['C:\\Program Files\\JetBrains\\PyCharm Community Edition 2017.3\\helpers\\pycharm\\_jb_tox_runner.py']
PYDEVD_FILTER_LIBRARIES False

Started in multiproc mode

('Connecting to ', '127.0.0.1', ':', '49717')
('Connected.',)
Connected to pydev debugger (build 173.3727.137)
debugger: received >>99 -1 49718
<<
Received command: ??? 99 -1 49718

Received port 49718

pydev debugger: process 17284 is connecting

('Connecting to ', '127.0.0.1', ':', '49718')
('Connected.',)
debugger: received >>501 1 0.1 WIN
<<
Received command: CMD_VERSION 501 1 0.1 WIN

sending cmd --> CMD_VERSION 501 1 @@BUILD_NUMBER@@
debugger: received >>111 3 python-line c:/****.py 91 source_object THREAD None None
<<
Received command: CMD_SET_BREAK 111 3 python-line c:/****.py 91 source_object THREAD None None

Added breakpoint:c:\****.py - line:91 - func_name:source_object

debugger: received >>111 7 python-line c:/****.py 212 filename THREAD None None
111 5 python-line c:/****.py 32 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 7 python-line c:/****.py 212 filename THREAD None None

Added breakpoint:c:\****.py - line:212 - func_name:filename

Received command: CMD_SET_BREAK 111 5 python-line c:/****.py 32 None THREAD None None

Added breakpoint:c:\****.py - line:32 - func_name:None

debugger: received >>111 9 python-line c:/****.py 9 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 9 python-line c:/****.py 9 None THREAD None None

Added breakpoint:c:\****.py - line:9 - func_name:None

debugger: received >>111 11 python-line c:/****.py 68 run THREAD None None
111 13 python-line c:/****.py 71 run THREAD None None
101 15
111 17 python-line c:/****.py 36 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 11 python-line c:/****.py 68 run THREAD None None

Added breakpoint:c:\****.py - line:68 - func_name:run

Received command: CMD_SET_BREAK 111 13 python-line c:/****.py 71 run THREAD None None

Added breakpoint:c:\****.py - line:71 - func_name:run

Received command: CMD_RUN 101 15

Received command: CMD_SET_BREAK 111 17 python-line c:/****.py 36 None THREAD None None

Added breakpoint:c:\****.py - line:36 - func_name:None

debugger: received >>111 19 python-line c:/****.py 170 target_table THREAD None None
146 21 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SET_BREAK 111 19 python-line c:/****.py 170 target_table THREAD None None

Added breakpoint:c:\****.py - line:170 - func_name:target_table

Received command: CMD_SHOW_RETURN_VALUES 146 21 SHOW_RETURN_VALUES 0

Show return values: False

IDE_PROJECT_ROOTS ['C:/****']

Patching args: ['C:\\Python27\\python.exe']
New args: C:\Python27\python.exe
sending cmd --> CMD_PROCESS_CREATED 149 2 <process/>
Patching args: ['C:\\****\\.tox\\env\\Scripts\\python.EXE', '-c', 'import sys; print(sys.executable);print(list(sys.version_info)); print(sys.version)']
('Connecting to ', '127.0.0.1', ':', '49717')
('Connected.',)
debugger: received >>99 -1 49725
<<
Received command: ??? 99 -1 49725

New args: C:\****\.tox\env\Scripts\python.EXE -c "import sys; sys.path.append(r'C:\Program Files\JetBrains\PyCharm Community Edition 2017.3\helpers\pydev'); import pydevd; pydevd.settrace(host='127.0.0.1', port=49725, suspend=False, trace_only_current_thread=False, patch_multiprocessing=True); from pydevd import SetupHolder; SetupHolder.setup = {'DEBUG_TRACE_LEVEL': 3, 'multiproc': True, 'save-asyncio': False, 'vm_type': None, 'save-threading': False, 'save-signatures': False, 'DEBUG_TRACE_BREAKPOINTS': 1, 'multiprocess': False, 'module': False, 'server': False, 'client': '127.0.0.1', 'file': 'C:\\Program Files\\JetBrains\\PyCharm Community Edition 2017.3\\helpers\\pycharm\\_jb_tox_runner.py', 'DEBUG_RECORD_SOCKET_READS': True, 'cmd-line': False, 'print-in-debugger-startup': False, 'qt-support': 'auto', 'port': 49717}; import sys; print(sys.executable);print(list(sys.version_info)); print(sys.version)"
sending cmd --> CMD_PROCESS_CREATED 149 4 <process/>
debugger: received >>111 23 python-line c:/****.py 91 source_object THREAD None None
<<
Received command: CMD_SET_BREAK 111 23 python-line c:/****.py 91 source_object THREAD None None

Added breakpoint:c:\****.py - line:91 - func_name:source_object

debugger: received >>111 25 python-line c:/****.py 32 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 25 python-line c:/****.py 32 None THREAD None None

Added breakpoint:c:\****.py - line:32 - func_name:None

debugger: received >>111 27 python-line c:/****.py 212 filename THREAD None None
<<
Received command: CMD_SET_BREAK 111 27 python-line c:/****.py 212 filename THREAD None None

Added breakpoint:c:\****.py - line:212 - func_name:filename

debugger: received >>111 29 python-line c:/****.py 71 run THREAD None None
<<
Received command: CMD_SET_BREAK 111 29 python-line c:/****.py 71 run THREAD None None

Added breakpoint:c:\****.py - line:71 - func_name:run

debugger: received >>111 31 python-line c:/****.py 36 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 31 python-line c:/****.py 36 None THREAD None None

Added breakpoint:c:\****.py - line:36 - func_name:None

debugger: received >>111 33 python-line c:/****.py 68 run THREAD None None
<<
Received command: CMD_SET_BREAK 111 33 python-line c:/****.py 68 run THREAD None None

Added breakpoint:c:\****.py - line:68 - func_name:run

debugger: received >>111 35 python-line c:/****.py 170 target_table THREAD None None
<<
Received command: CMD_SET_BREAK 111 35 python-line c:/****.py 170 target_table THREAD None None

Added breakpoint:c:\****.py - line:170 - func_name:target_table

debugger: received >>146 37 SHOW_RETURN_VALUES 0
<<
Received command: CMD_SHOW_RETURN_VALUES 146 37 SHOW_RETURN_VALUES 0

Show return values: False

debugger: received >>111 39 python-line c:/****.py 9 None THREAD None None
<<
Received command: CMD_SET_BREAK 111 39 python-line c:/****.py 9 None THREAD None None

Added breakpoint:c:\****.py - line:9 - func_name:None

sending cmd --> CMD_PROCESS_CREATED 149 6 <process/>
dev installed: apiclient==1.0.3,argcomplete==1.9.3,asn1crypto==0.24.0,backports-abc==0.5,bcrypt==3.1.4,boto==2.48.0,boto3==1.5.24,botocore==1.8.38,cachetools==2.0.1,certifi==2018.1.18,cffi==1.11.4,chardet==3.0.4,crcmod==1.7,cryptography==2.1.4,docutils==0.14,enum34==1.1.6,funcsigs==1.0.2,futures==3.2.0,gcs-oauth2-boto-plugin==1.14,google-api-core==0.1.4,google-api-python-client==1.5.0,google-apitools==0.5.16,google-auth==1.3.0,google-cloud-bigquery==0.28.0,google-cloud-core==0.28.0,google-cloud-storage==1.7.0,google-resumable-media==0.3.1,googleapis-common-protos==1.5.3,gsutil==4.28,httplib2==0.10.3,idna==2.6,ipaddress==1.0.19,jmespath==0.9.3,lockfile==0.12.2,luigi==2.7.2,mock==2.0.0,mysql-connector-python==8.0.6,numpy==1.14.0,oauth2client==2.2.0,pandas==0.22.0,paramiko==2.4.0,pbr==3.1.1,pluggy==0.6.0,protobuf==3.5.1,psycopg2==2.7.3.2,py==1.5.2,pyasn1==0.4.2,pyasn1-modules==0.2.1,pycparser==2.18,PyJWT==1.5.3,PyNaCl==1.2.1,pyodbc==4.0.22,pyOpenSSL==17.5.0,pysftp==0.2.9,python-daemon==2.1.2,python-dateutil==2.6.1,python-gflags==3.1.2,pytz==2017.3,requests==2.18.4,retry-decorator==1.1.0,rsa==3.4.2,s3transfer==0.1.12,Salesforce-FuelSDK==1.0.1,simple-salesforce==0.73.0,simplejson==3.13.2,singledispatch==3.4.0.3,six==1.11.0,SocksiPy-branch==1.1,SQLAlchemy==1.2.4,suds-jurko==0.6,tornado==4.5.3,tox==2.9.1,tox-battery==0.5,uritemplate==0.6,urllib3==1.22,virtualenv==15.1.0
dev runtests: PYTHONHASHSEED='358'
dev runtests: commands[0] | luigi --workers 4 --module framework.test_utils.development_testing DevelopmentTest
sending cmd --> CMD_PROCESS_CREATED 149 8 <process/>
DEBUG - Checking if DevelopmentTest(run_timestamp=2018-03-1209:31:18.633000) is complete
sending cmd --> CMD_THREAD_CREATE 103 10 <xml><thread name="Dummy-12" id="pid_17284_id_71317136" /></xml>
sending cmd --> CMD_THREAD_CREATE 103 12 <xml><thread name="Dummy-11" id="pid_17284_id_71317328" /></xml>
sending cmd --> CMD_THREAD_CREATE 103 14 <xml><thread name="MainThread" id="pid_17284_id_51442256" /></xml>
INFO - Informed scheduler that task DevelopmentTest_2018_03_1209_31__daa7be4c05 has status PENDING
INFO - Done scheduling tasks
INFO - Running Worker with 4 processes
DEBUG - Asking scheduler for work...
DEBUG - Pending tasks: 1
DEBUG - Asking scheduler for work...

0
Comment actions Permalink

Sorry for the delay.

We have similar issue under investigation: https://youtrack.jetbrains.com/issue/PY-28384. Please try provided workaround.

0
Comment actions Permalink

Unfortunately this doesn't solve my problem. 

0
Comment actions Permalink

Please keep following issue on YouTrack for updates. We'll try to provide fix or workaround as soon as possible.

0
Comment actions Permalink

I'm seeing this same issue (breakpoints not being triggered) running PyCharm 2018.2.

The debug session starts with

C:\Program Files\JetBrains\PyCharm 2018.1.2\bin\runnerw.exe" C:\Users\bfarrell\PycharmProjects\gen2portal\djangoportal\venv\Scripts\python.exe "C:\Program Files\JetBrains\PyCharm 2018.1.2\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 55098 --file C:/Users/bfarrell/PycharmProjects/gen2portal/djangoportal/manage.py runserver localhost:8001

It's very frustrating as this worked fine before upgrading PyCharm.

0
Comment actions Permalink

FYI I uploaded the idea.log as 

ideaLogBFarrell20180809.log
0
Comment actions Permalink

Hi, i faced the same issues ,

i am using Mac OS 10.13.6 ,python 2.7.9 using Virtualenv and i noticed that after recent update to pycharm 2018.3 ,

some of my python modules cannot debug , pycharm itself can connect to the debugger on the same project ,but is strange in one of my folders which consist of many different python modules ,some how in that folder all the modules, when i set break point , it just wont triggered the debug . So I did a simple test ,after exhausting all web searches , i moved the effected modules to another folder which consists of other modules that has no problem in triggering the break points , 

BINGO , the break points works again , i not too sure what happened , but mean time , i use this method temporary as i have spent much time in finding solutions with no progress, i desperately need the debug function for my code . Hope this can give some insight for the pycharm developers to track what went wrong and come up some fixes for this . thanks. 

0
Comment actions Permalink

Hi Kalmenchia, more details are welcome, what was the original folder name? Could you please create a ticket in our bug tracker: https://youtrack.jetbrains.com/issues/PY?

0
Comment actions Permalink

for me it helped when I've set "Working directory" and "Path mappings" in "Run -> Edit Configurations"

0
Comment actions Permalink

MacOS High Sierra (10.13.6)
Pycharm v2019.1.3.

I had the same issue, IDE suddenly stopped stopping at breakpoints.

Simply setting the working directory under run configurations made it to work again.

3
Comment actions Permalink

macOS 10.14.5

PyCharm v2019.1.3

I had the same issue too.

0
Comment actions Permalink

I have the same issue on 2019.2. Pycharm stop at breakpoint in the start file but any breakpoints in my package modules are ignored. I do not change any default settings of debugger

3
Comment actions Permalink

I have the same problem as Solozhentsev after I upgraded to 2019.2 recently. Please help!

3
Comment actions Permalink

For anyone having the same problem, it works again if I rollback to 2019.1.3

4
Comment actions Permalink

Yes, definitely seems to be a new issue introduced in 2019.2

1
Comment actions Permalink

Yes. Facing the same issue. Debug was working fine friday before mac update was run. I am using 2019.1.2 (Community Edition). I tried upgrading to 2019.1.3 but same issue continues.

Workaround - I deleted .idea folder and reconfigure all, breakpoins works again

0
Comment actions Permalink

I'm having the same problem, deleting the .idea folder doesn't seem to fix it for me.

0
Comment actions Permalink

I'm using 2019.2 build 192.5728.105

Python 3.6.5

Same Issue. Is there any work around? Tried setting Working Directory, but did'nt change anything.

Also deleted .idea, same.

0
Comment actions Permalink

Solved for me after disabling Coverage from pytests

0
Comment actions Permalink

What do you mean by 'disabling Coverage from pytests'? I'm not using coverage, I'm just using the pycharm debugger.

1
Comment actions Permalink

Hello everyone,

First of all, I'm very sorry for the inconvenience.

There are few known issues with debugger skipping breakpoints, such as https://youtrack.jetbrains.com/issue/PY-36993 and https://youtrack.jetbrains.com/issue/PY-37124

If you are facing one of those issues, please upvote and follow it for updates.

In case the problem is different, please file another ticket to https://youtrack.jetbrains.com/issue/PY

For the investigation, please add PYCHARM_DEBUG=True environment variable to your run configuration, debug (to reproduce the problem) and provide the whole console output in the description/comments of your ticket.

 

0
Comment actions Permalink

My problem is a bit different, the debugger seems to stop at all breakpoints within the main module, but skips all breakpoints in any other module. I have the exact same project with identical settings on my laptop which has Pycharm 2019.1.4 and it doesn't skip any breakpoints.

I have the logs and console output from running it with `PYCHARM_DEBUG=True`, but I don't know if this warrants a separate ticket. I've never filed a ticket before, so I'm not sure what I should write if I do need to submit it.

1
Comment actions Permalink

Hi Jayden,

Since the same project works fine in 2019.1.4, would be great if you could provide the project or its relevant part for reproducing.

If it's not possible, file a ticket to YouTrack using the above-provided link and attach the console output (after setting PYCHARM_DEBUG=True)  along with the logs.

0
Comment actions Permalink

Here is a link to the project: https://bitbucket.org/JaydenKing32/comp335-sim-viz/src/debug/

Please use the 'debug' branch, it exhibits the same behaviour that I have described, but it doesn't require command line arguments like the master branch. I've also commented out the code that produces visual output, as it may be distracting and the behaviour still occurs without it. Ignore the README, it's for a previous version.

`sim_viz.py` is the main file, but I want to debug the `get_servers_from_system` function from `server.py`, which is called on line 26 of `sim_viz.py`. For example, I set breakpoints on lines 24 and 30 of `sim_viz.py` and line 136 of `server.py`, which is the first line of the `get_servers_from_system` function. If I run a debug with `sim_viz.py` execution will stop on line 24, if I press the resume button then the execution will continue to line 30, skipping the breakpoint in `get_servers_from_system`.

0
Comment actions Permalink

I believe it's https://youtrack.jetbrains.com/issue/PY-37124, the problem is caused by a filename.

0
Comment actions Permalink

Yes, changing the name of `server.py` fixes the problem. I thought it was just a coincidence that ticket had a `server.py` file, I didn't realise it was specifically referring to the name of the file.

0

Please sign in to leave a comment.