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

When launching PTVSD fails, debugging stops silently in VS Code Debugger #55

Closed
DonJayamanne opened this issue Feb 10, 2018 · 2 comments

Comments

@DonJayamanne
Copy link
Contributor

  • I'm using the ptvsd_launcher.py to launch the debugger
  • I've created a simple python file with mixed indentation (using spaces and tabs)
  • When launching the debugger, the process falls over simply because the code is buggy.
  • However what's interesting is PTVSD has managed to connect and send and receive protocol messages, unfortunately it doesn't know anything about the errors.

Looking at the code, there doesn't seem to be any exception handling around the launching of a file. I could be mistaken.

I could ready stderr output from the process and display that when the process exits.
Though this isn't a clean approach, it isn't really possible today due to the noise printed out into stdout and stderr by pydevd.

@karthiknadig How does PTVS handle this scenario?

@DonJayamanne DonJayamanne changed the title Launching PTVSD fails and error messages ignored by VS Code Debugger When launching PTVSD fails debugging fails silently in VS Code Debugger Feb 10, 2018
@DonJayamanne DonJayamanne changed the title When launching PTVSD fails debugging fails silently in VS Code Debugger When launching PTVSD fails, debugging stops silently in VS Code Debugger Feb 10, 2018
@int19h
Copy link
Contributor

int19h commented Feb 10, 2018

stderr would be a dead end, since we don't control what the user code is printing out, even ignoring pydevd.

This should be reported similar to any other exception. I would have expected pydevd to handle it via the normal exception reporting channels, but we might need to special-case errors coming out of parsing. Either way, from VS and VSC perspective, they shouldn't need any special handling.

@int19h
Copy link
Contributor

int19h commented Feb 28, 2018

I'm not seeing the repro anymore - instead, SyntaxError is reported as a regular exception:

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

3 participants