I've been using Visual Studio code for a long time with the Python extension.
Currently I have Visual Studio Code version 1.27.2, Python extension "ms-python.python" version 2018.8.0, python version 3.6.6, hosted by a Windows 10 1803 Enterprise Edition system.
Compared to the past, the latest version of Code / MS Python behaves differently in the debugging process.
In the past the execution of the following Python code, within Visual Studio Code, would not have generated any exceptions:
# Import exit from sys from sys import exit as sys_exit # Exit to system with errorlevel set to 1 sys_exit(1) # Next instruction is never executed. # Executing the script directly from the terminal in Windows sets the # errorlevel to 1 and the script execution is terminated. print('unreachable code')
Now the result is a SystemExit exception when sys_exit(1) instruction is executed (VSCode screenshot).
Question: is there a way to disable this behavior and return to the previous one?
I ran into something similar while debugging my flask application. My work-around was to uncheck "Uncaught Exceptions" in the breakpoint menu at the bottom of the debug window.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With