Debug Flask fails at breakpoints after 2019.2 update

Hi,

All this started after the recent 2019.2 update.

I have a Flask app. It runs normally when not debugging.

If I try to debug it with breakpoints set somewhere in view functions, it never reach a breakpoint and the whole debug process starts throwing exceptions and ends with

Process finished with exit code -1

Before that it throws these exceptions

SystemError: ..\Objects\codeobject.c:851: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1056, in _pydevd_bundle.pydevd_cython_win32_36_64.fix_top_level_trace_and_get_trace_func
File "C:\Program Files\Python36\lib\ntpath.py", line 235, in basename
File "C:\Program Files\Python36\lib\ntpath.py", line 204, in split
SystemError: <built-in function fspath> returned a result with an error set
Exception ignored in: '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_bytecode_while_frame_eval'
Traceback (most recent call last):
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1056, in _pydevd_bundle.pydevd_cython_win32_36_64.fix_top_level_trace_and_get_trace_func
File "C:\Program Files\Python36\lib\ntpath.py", line 235, in basename
File "C:\Program Files\Python36\lib\ntpath.py", line 204, in split
SystemError: <built-in function fspath> returned a result with an error set
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 729, in __call__
File "C:\Program Files\Python36\lib\threading.py", line 884, in _bootstrap
SystemError: error return without exception set

During handling of the above exception, another exception occurred:

SystemError: ..\Objects\codeobject.c:851: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "_pydevd_frame_eval\pydevd_frame_evaluator_win32_36_64.pyx", line 191, in _pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_func_code_info
SystemError: <class '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.FuncCodeInfo'> returned a result with an error set
Exception ignored in: '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_bytecode_while_frame_eval'
Traceback (most recent call last):
File "_pydevd_frame_eval\pydevd_frame_evaluator_win32_36_64.pyx", line 191, in _pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.get_func_code_info
SystemError: <class '_pydevd_frame_eval.pydevd_frame_evaluator_win32_36_64.FuncCodeInfo'> returned a result with an error set
Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x0000015DD1193C50>
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 729, in __call__
File "C:\Program Files\Python36\lib\threading.py", line 884, in _bootstrap
SystemError: error return without exception set

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 732, in __call__
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1029, in _pydevd_bundle.pydevd_cython_win32_36_64.SafeCallWrapper.__call__
File "_pydevd_bundle\pydevd_cython_win32_36_64.pyx", line 1203, in _pydevd_bundle.pydevd_cython_win32_36_64.TopLevelThreadTracerOnlyUnhandledExceptions.trace_unhandled_exceptions
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_breakpoints.py", line 110, in stop_on_unhandled_exception
File "C:\Program Files\JetBrains\PyCharm 2019.2\helpers\pydev\_pydevd_bundle\pydevd_breakpoints.py", line 91, in get_exception_breakpoint
SystemError: error return without exception set

What do I do wrong? Have no functioning debug after the 2019.2 update...

Regards,

Vladimir

4 comments
Comment actions Permalink

Hi Vladimir,

Would it be possible to provide some sample project for reproducing?
I tried it with my Flask projects, but it works fine.

You can upload it to https://uploads.services.jetbrains.com/ zipped but please let me know the name of the file so I can find it.

0
Comment actions Permalink

Hi Sergey, thank you for the reply.

The app is quite big, fast attempt to compile a sample project with error did not give results. Unfortunately I cannot spend much time on locating the error now.

0
Comment actions Permalink

After the new update 2019.2.1 of Pycharm I can again use breakpoints in my Flask app.

0
Comment actions Permalink

I have similar problem when using Pycharm Professional 2019.2 or 2019.2.1 .  Using Pycharm Professional 2019.1.3 there is no problem.

operating system: ubuntu 18.04, updated

I am placing breakpoints in the code. If it is non Flask, the debugger stops as usual.

If a Flask app, the breakpoints are ignored. I tried invalidating the cache and restarting.

I created a second run config, changing only the name. In the new run config, there is a printout that the debugger connects and waits forever.

 

0

Please sign in to leave a comment.