Very slow debugger in pycharm

Hello, I use

PyCharm 2020.1.1 (Professional Edition)
Build #PY-201.7223.92, built on April 30, 2020
Runtime version: 11.0.6+8-b765.40 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-99-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 966M
Cores: 4
Registry: debugger.watches.in.variables=false

and faced with very slow debugging, especiallt when I press F9 or Shift-F8.

It occurred just after I clear ~/.local folder

How to fix it? 

 

19 comments
Comment actions Permalink

Hi, it seems like a bug which needs to be investigated, and forums seems to be not the best place for it. Could you please submit a support request (https://intellij-support.jetbrains.com/hc/en-us/?pycharm) and provide:

1.  Logs from **Help | Collect Logs and Diagnostic Data** after reproducing the issue

2. Code sample and steps to reproduce if possible

3. Does the issue reproduce when running without debugger? 

4. Please add `PYCHARM_DEBUG=True` env variable to your run/debug configuration, reproduce the issue, and provide full console output. 

0
Comment actions Permalink

any update with this?  I am running 2020.2 and it's so slow in debug mode.  orders of magnitude slower.  

4
Comment actions Permalink

+1

 

I'm also seeing this in 2020.2 for linux.  The behavior I see is that the initial load-in for the debugger takes over 20 seconds.  This was much faster in 2018 version of pycharm.

 

When I look at htop I see a single core just getting maxed but little to no activity on any other cores.  Was this threaded before? 

1
Comment actions Permalink

This happens to us as well. A full tests session take around 15 minutes for us, but with the debugger on it is 150-300 minutes long.

Indeed, I see a single process at 100% CPU on a single core. All the other processes, as well as cores, are at very low CPU usage.

1
Comment actions Permalink

This ticket helped me: https://youtrack.jetbrains.com/issue/PY-44270 (currently it does not have a lot of info about the actual issue)

 

2019.3.5: 18sec

2020.2.1 (with "Drop into debugger on failed tests" enabled): 60sec

2020.2.1 (with "Drop into debugger on failed tests" disabled): 22sec

2
Comment actions Permalink

I have also found that the debugger has become very slow. I'm using PyCharm Pro 2020.2.

0
Comment actions Permalink

@Ocoming Soon - thanks for the comparison between versions. 

 

This matches my impression that the Drop into debugger on failed tests must be doing tons of work prior to running the tests.  Before 2020.2.1 i was using 2018 version so this feature was the "Newest" thing I noticed.

 

I reverted back to 2018 because I don't have time to deal with 2020.2.1 issues right now.  Looking forward to smooth sailing when stuff like this is fixed

0
Comment actions Permalink

I am not sure what's going on, but executing my code step by step in PyCharm is extremely slow, it takes about 10 minutes to execute a line like this:

wb = load_workbook('K:/Contacts.xlsx')

and if I stop the code with a breakpoint there and execute the same line in the console instead, it takes just a couple seconds.

Also just noticed now in PyCharm 2020.2

0
Comment actions Permalink

Also I am experiencing the same issue on Mac for PyCharm 2020.2. Crazily slow debugging to the point that I cannot debug.

 

0
Comment actions Permalink

I solved my problem just by changing the version of the python I was using from 3.7 to 3.8. I do not know maybe my python 3.7 was buggy.

0
Comment actions Permalink

I've unticked "Drop into debugger on failed tests" and ticked "Gevent compatible" and it's now working properly

1
Comment actions Permalink

Has anyone tried going back to an older version of pycharm? did that work for you?

0
Comment actions Permalink

I reinstalled the older version and it worked fine. I still mostly use the new version as the debugger is only slow with some tests. For most of my work, it’s fine.

0
Comment actions Permalink

Alessio That link gave me a 404.

0
Comment actions Permalink

Oh, I guess that issue is visible only to me then.

In any case, this is the case that was created on YouTrack: https://youtrack.jetbrains.com/issue/PY-44803?_ga=2.242078978.1658792144.1601896315-899772060.1468913181

This should be publicly visible.

0
Comment actions Permalink

Thanks, I have added a comment to the YouTrack issue and voted for it.

0

Please sign in to leave a comment.