Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Break on unhandled exception does not show popup #90

Closed
huguesv opened this issue Feb 16, 2018 · 2 comments
Closed

Break on unhandled exception does not show popup #90

huguesv opened this issue Feb 16, 2018 · 2 comments

Comments

@huguesv
Copy link
Contributor

huguesv commented Feb 16, 2018

Visual Studio, Python 3.6

Here's my code

print('hello')
input('>')
hello
print('yes')
print('end')

it breaks on hello and the error is displayed in console, but the exception popup doesn't appear

image

@huguesv huguesv added this to the Preview 1 milestone Feb 16, 2018
@karthiknadig
Copy link
Member

Looks like pydev does not treat this as a exception break, instead it is treated as a normal stop (see stopped event, reason is paused):

 1> [DebugAdapter] <--   R (configurationDone-4): {"type": "response", "seq": 4, "request_seq": 4, "success": true, "command": "configurationDone", "message": "", "body": {}}
 1> [DebugAdapter] <--   E (process): {"type": "event", "seq": 5, "event": "process", "body": {"name": "C:\\Users\\kanadig\\Source\\Repos\\PyScratch\\Scratch\\Scratch.py", "systemProcessId": 16992, "isLocalProcess": true, "startMethod": "launch"}}
 1> [DebugAdapter] <--   E (thread): {"type": "event", "seq": 6, "event": "thread", "body": {"reason": "started", "threadId": 1}}
 1> [DebugAdapter] <--   E (stopped): {"type": "event", "seq": 7, "event": "stopped", "body": {"reason": "pause", "threadId": 1, "allThreadsStopped": true}}
 1> [DebugAdapter] --> C (threads-5): {"command":"threads","arguments":{},"seq":5,"type":"request"}
 1> [DebugAdapter] <--   R (threads-5): {"type": "response", "seq": 8, "request_seq": 5, "success": true, "command": "threads", "message": "", "body": {"threads": [{"id": 1, "name": "MainThread"}]}}
 1> [DebugAdapter] --> C (stackTrace-6): {"command":"stackTrace","arguments":{"threadId":1,"startFrame":0,"levels":1000,"format":{"parameters":true,"parameterTypes":true,"parameterNames":true,"line":true,"module":true}},"seq":6,"type":"request"}
 1> [DebugAdapter] <--   R (stackTrace-6): {"type": "response", "seq": 9, "request_seq": 6, "success": true, "command": "stackTrace", "message": "", "body": {"stackFrames": [{"id": 1, "name": "<module>", "source": {"path": "c:\\users\\kanadig\\source\\repos\\pyscratch\\scratch\\scratch.py"}, "line": 57, "column": 0}, {"id": 2, "name": "execfile", "source": {"path": "g:\\pyenv\\test1\\lib\\site-packages\\_pydev_imps\\_pydev_execfile.py"}, "line": 25, "column": 0}, {"id": 3, "name": "run", "source": {"path": "g:\\pyenv\\test1\\lib\\site-packages\\pydevd.py"}, "line": 1022, "column": 0}, {"id": 4, "name": "main", "source": {"path": "g:\\pyenv\\test1\\lib\\site-packages\\pydevd.py"}, "line": 1615, "column": 0}, {"id": 5, "name": "debug", "source": {"path": "g:\\pyenv\\test1\\lib\\site-packages\\ptvsd\\debugger.py"}, "line": 31, "column": 0}, {"id": 6, "name": "<module>", "source": {"path": "c:\\users\\kanadig\\appdata\\local\\microsoft\\visualstudio\\15.0_dcfc3d47exp\\extensions\\microsoft corporation\\python\\3.0\\ptvsd_launcher.py"}, "line": 96, "column": 0}], "totalFrames": 6}}
 1> [DebugAdapter] --> C (scopes-7): {"command":"scopes","arguments":{"frameId":1},"seq":7,"type":"request"}
 1> [DebugAdapter] <--   R (scopes-7): {"type": "response", "seq": 10, "request_seq": 7, "success": true, "command": "scopes", "message": "", "body": {"scopes": [{"name": "Locals", "expensive": false, "variablesReference": 1}]}}
 1> [DebugAdapter] --> C (variables-8): {"command":"variables","arguments":{"variablesReference":1,"timeout":1000},"seq":8,"type":"request"}
 1> [DebugAdapter] <--   R (variables-8): {"type": "response", "seq": 11, "request_seq": 8, "success": true, "command": "variables", "message": "", "body": {"variables": [{"name": "__builtins__", "type": "dict", "value": "{'ArithmeticError': <class 'ArithmeticError'>, 'AssertionError': <class 'AssertionError'>, 'AttributeError': <class 'AttributeError'>, 'BaseException': <class 'BaseException'>, 'BlockingIOError': <class 'BlockingIOError'>, 'BrokenPipeError': <class 'BrokenPipeError'>, 'BufferError': <class 'BufferError'>, 'BytesWarning': <class 'BytesWarning'>, 'ChildProcessError': <class 'ChildProcessError'>, 'ConnectionAbortedError': <class 'ConnectionAb...tedError'>, 'ConnectionError': <class 'ConnectionError'>, 'ConnectionRefusedError': <class 'ConnectionRe...sedError'>, 'ConnectionResetError': <class 'ConnectionResetError'>, 'DeprecationWarning': <class 'DeprecationWarning'>, ...}", "variablesReference": 2}, {"name": "__doc__", "type": "NoneType", "value": "None"}, {"name": "__exception__", "type": "tuple", "value": "(<class 'NameError'>, NameError(\"name 'hel...defined\",), None)", "variablesReference": 3}, {"name": "__file__", "type": "str", "value": "'C:\\\\Users\\\\kanadig\\\\Source\\\\Repos\\\\PyScratch\\\\Scratch\\\\Scratch.py'"}, {"name": "__loader__", "type": "SourceFileLoader", "value": "<_frozen_importlib_external.SourceFileLoader object at 0x000001CC70A91438>", "variablesReference": 4}, {"name": "__name__", "type": "str", "value": "'__main__'"}, {"name": "__package__", "type": "NoneType", "value": "None"}, {"name": "__spec__", "type": "NoneType", "value": "None"}]}}

But in the exception info is printed in the console.

@karthiknadig
Copy link
Member

This is fixed:
image

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants