Exception/stacktrace not printed when hitting Python Exception Breakpoint

Answered

Hi,

 

I've recently upgraded to PyCharm Professional Edition from Community Edition and I'm now encountering this issue:

In the Community Edition, when a Python Exception Breakpoint is hit, the full exception and stacktrace is printed to the console, which makes it quick and easy to find the source of an error. In Professional Edition, I'm finding that this is not the case. The breakpoint is hit and the program is suspended, but there's no output in the console. I can produce the text by running the line where the exception occurred but it's a little frustrating to have to do this when previously the whole process was automated. Why is this different in the Professional Edition and is there a way I can restore the behaviour seen in the Community Edition?

I am running on Debian and this issue appears in any and every project I use.

 

I would greatly appreciate any assistance with or advice on this issue.

 

Thanks,

Matt

7 comments
Comment actions Permalink

Hi Matt,

It sounds like https://youtrack.jetbrains.com/issue/PY-37212 which should be fixed in 2019.2.1

You can already try our RC build by installing it from Toolbox App.

0
Comment actions Permalink

Hi Sergey,

 

Thanks for your response. Do you mean to say that the issue should already be fixed in 2019.2.1 RC or is slated to be fixed by the 2019.2.1 release? I've installed 2019.2.1 RC (Build #PY-192.6262.38), but I'm afraid the issue is still present.

 

Thanks,
Matt

0
Comment actions Permalink

Oh, you are right.

Perhaps it was wrongly closed as a duplicate of another ticket. I opened it again. Please vote for it and follow for updates.
Sorry about that.

0
Comment actions Permalink

I have the same issue in Pycharm Professional 2019.2.1.  However I did not just switch from Community Edition.  In fact, I upgraded my Professional Edition to 2019.2.1 hoping it would fix the issue, but obviously that didn't happen.  I am temporarily reading the stacktrace by clicking into '__exception__' in the variables window, so clearly the info is available, it's just not printing in the console.

I have both remote and local projects.  All of my machines are running linux.

I've tried a variety of settings in Breakpoints > Python Exception Breakpoint > Any exception.

In Run/Debug Configurations, I tried enabling 'Emulate terminal in output console' but saw no improvement.

0
Comment actions Permalink

I see that a bug has been fixed here: https://youtrack.jetbrains.com/issue/PY-37212.  I updated to build 192.6603.34 and tried it.  However, this helps reveal that my issue might be different.  I can open a new issue if that's the best way to do this.

If I open a new python file and add a line "print(s)", then right click and choose "Debug 'file.py'", the exception is caught but does not print in the console window.  If instead I type and run "print(s)" directly into the console window, the exception is printed.

 

 

1
Comment actions Permalink

I am on the Community Edition and am having the same problem. Also tried updating to 192.6603.34 and the problem persists. 

0
Comment actions Permalink

In reference to edata's comment, This is the same issue I was originally describing.

0

Please sign in to leave a comment.