maybe related to #12264
I am using vscode debugger as usual. But since yesterday, me and my coworkers started getting Exception has occurred: ModuleNotFoundError.
I started getting Exception has occurred: ModuleNotFoundError since around yesterday noon. I notice that that time coincide new version release time. https://github.com/microsoft/vscode-python/releases/tag/2020.5.86398
I extracted simple code to reproduce. Simple try except import can be used to reproduce error.
As a temporary fix for those who are having similar problems, I removed the following ticks and solved the problem for now.
Same here... If you install the previous version: [email protected] it's work. But is not the best way to solve it.
This is microsoft/debugpy#281
The bug is that the exception is reported incorrectly when it shouldn't be, but it doesn't actually break your app - if you press F5, it should continue running. To prevent it from being reported, uncheck "User-Unhandled Exceptions" in the Breakpoints pane in bottom left.
(You shouldn't need to uncheck "Unhandled Exceptions".)
This issue is also affecting Azure Functions Python function app.
Related Issues:
Python Worker grpc_tools not found: https://github.com/Azure/azure-functions-python-worker/issues/690
Azure Functions Core Tools for function app debug: https://github.com/Azure/azure-functions-core-tools/issues/2026
Since we have an issue tracking it in the debugpy repo, I'm going to close this one.
Note that the default for this setting has been changed, so nobody on the current version of the extension should be hitting this for new workspaces. However, the set checkbox may be checked in existing workspaces, in which case it would need to be unchecked manually.
Most helpful comment
This is microsoft/debugpy#281
The bug is that the exception is reported incorrectly when it shouldn't be, but it doesn't actually break your app - if you press F5, it should continue running. To prevent it from being reported, uncheck "User-Unhandled Exceptions" in the Breakpoints pane in bottom left.
(You shouldn't need to uncheck "Unhandled Exceptions".)