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

Debugger breaks into _pydev_execfile.py if there are syntax errors in pythonfile #113

Closed
DonJayamanne opened this issue Feb 23, 2018 · 4 comments
Labels

Comments

@DonJayamanne
Copy link
Contributor

  • Debug using VS Code experimental debugger
  • Un select Raised Exceptions
  • Select Uncaught Exceptions
  • Debug python program with syntax errors
if True

Debugger will break into _pydev_execfile.py

@huguesv
Copy link
Contributor

huguesv commented Mar 2, 2018

What should it do? Not break perhaps?

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Mar 5, 2018

What should it do? Not break perhaps?

Yes, or more precisely I'd expect it to just fall over with the runtime exception (error and stack trace printed in output window).

@int19h
Copy link
Contributor

int19h commented Mar 5, 2018

I'm confused. We had a bug previously where the problem was that it didn't break (but instead just let Python print the error stack and then terminate): #55.

I think breaking with an exception notification is preferable, because it's much clearer to the user what the problem is, even if running in external terminal. We can strip our and pydevd internal frames from that stack, though (not just here, but in general) - but technically that would be a part of the Just My Code feature.

@DonJayamanne
Copy link
Contributor Author

When I reported issue #55, I wasn't using the terminal, I was using the standard VS Code debugger console (as that's the default output window in our extension). The problem then was that it was falling over without sending a message indicating the fact that the program ended.

Couple of problems in #55:

I think breaking with an exception notification is preferable, because it's much clearer to the user what

Agreed. Yes, this is an exception.
So, I guess, the real solution is to break on the actual syntax exception & not in pydev.
So the #26 should ideally resolve this issue.

Will close this issue in favor of #26

@DonJayamanne DonJayamanne changed the title Debugger breaks into _ydev_execfile.py if there are syntax errors in pythonfile Debugger breaks into _pydev_execfile.py if there are syntax errors in pythonfile Mar 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants