Can I start the Pycharm debugger from code like pdb?

When I run in Pycharm debug mode, the execution is much slower.

I am trying to debug a partt of my code that takes two minutes to get too in debug mode. In run mode it takes a few seconds.

Can I "run" and then invoke "debug" mode at some point from code?

This is easy to do in pdb and convenient, but I prefer the Pycharm debugger.

1
1 comment

Hi,

The only way I can think of is to run parts of the code in python console until you reach the required line, and then attach the debugger. But I imagine it could be slow as well.

It could be interesting to see what kind of project results in such massive difference in run time with debugger vs no debugger. Would be great if you reported the issue to https://youtrack.jetbrains.com/

It could be one of known issues https://bit.ly/2JDQ7Za

0

Please sign in to leave a comment.