Skip to content

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

Closed

Description

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

Activity

  1. DonJayamanne commented on Nov 14, 2017

    @DonJayamanne
    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.

  2. added
    bug
    on Nov 14, 2017
  3. DonJayamanne commented on Jan 4, 2018

    @DonJayamanne
    Author

    @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.

  4. DonJayamanne commented on Jan 4, 2018

    @DonJayamanne
    Author

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

  5. DonJayamanne commented on May 4, 2018

    @DonJayamanne
    Author

    @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).

  6. added
    info-needed
    and removed on May 4, 2018
  7. no-response commented on Jun 11, 2018

    @no-response

    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.

  8. locked as resolved and limited conversation to collaborators on Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbuginfo-needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions