Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger does not stop for uncaught Python exceptions raised from native code #155

Closed
DonJayamanne opened this issue Nov 14, 2017 · 5 comments
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@DonJayamanne
Copy link

From @zneak on August 3, 2017 0:9

Environment data

VS Code version: Version 1.14.2 (1.14.2)
Python Extension version: 0.6.9
Python Version: Python 2.7.10
OS and version: macOS Sierra 10.12.4

Actual behavior

The debugger does not stop when an uncaught exception is raised from native code, even if the breakpoint on "uncaught exceptions" is set.

Expected behavior

The debugger should probably stop wherever looks the most appropriate (probably on the most recent Python stack frame).

Steps to reproduce:

  • Install Cython
  • Create an "ext.pyx" file that only contains raise KeyError("oopsie")
  • Build extension with Cython, then copy the shared object to a place that you can easily import it from (like the source folder)
  • From VS Code, create and run a Python script that imports said extension

Logs

Output from Python output panel: (traceback ...)
Output from Console window (Help->Developer Tools menu): (empty)

Copied from original issue: DonJayamanne/pythonVSCode#1137

@DonJayamanne
Copy link
Author

From @zneak on August 3, 2017 0:15

Looks like the debugging support comes from IPython. Let me know if I should see help there instead.

@brettcannon brettcannon added awaiting 1-verification area-debugging bug Issue identified by VS Code Team member as probable bug labels Nov 14, 2017
@DonJayamanne
Copy link
Author

DonJayamanne commented Jan 4, 2018

@zneak
Please accept my apologies for not getting back to you any sooner. I've looked into this and found that I can get it to work by selecting the checkbox All Exceptions under Breakpoints in the Debugger panel. As a workaround, please select this checkbox for the moment.

I'll look into why it isn't breaking when Uncaught Exceptions is selected.

@DonJayamanne
Copy link
Author

Test on PTVS Tools (Visual Studio) and I can see the same behavior.
@ericsnowcurrently you might want to be across this.

@DonJayamanne
Copy link
Author

DonJayamanne commented May 4, 2018

@zneak
I've got some great news for you. We've been actively working on a new debugger for the python extension and believe this feature works in that experimental debugger.

Please ensure you have the latest version of the python extension and

  • Test this using the Experimental debugger.
  • Or just change the setting "type":"python" in launch.json to "type":"pythonExperimental"

Do let us know how this goes.

Please ensure the pyx files are located in the same directory as the compiled output (this way the debugger will file the file and break at the corresponding line of code in the pyx file).

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster upstream-ptvsd-old and removed needs PR labels May 4, 2018
@DonJayamanne DonJayamanne added this to the May 2018 milestone May 4, 2018
@DonJayamanne DonJayamanne removed this from the May 2018 milestone May 31, 2018
@no-response no-response bot closed this as completed Jun 11, 2018
@no-response
Copy link

no-response bot commented Jun 11, 2018

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants