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

Script containing sys.exit(255) throws an Error on visualstudio_py_launcher_nodebug.py #454

Closed
alonke opened this issue Dec 18, 2017 · 1 comment
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@alonke
Copy link

alonke commented Dec 18, 2017

Environment data

VS Code version: 1.19.0
Python Extension version: 0.9.0
Python Version: 2.7.12
OS and version: Ubuntu 16.04

Actual behavior

.vscode/extensions/ms-python.python-0.9.0/pythonFiles/PythonTools/visualstudio_py_launcher_nodebug.py", line 117, in handle_exception
frame_file = path.normcase(tb[i][0])
NameError: global name 'path' is not defined

Expected behavior

SystemExit: 255

Steps to reproduce:

  • On a python script that contains sys.exit(255) run it with Ctrl+F5

Changing
line 117 frame_file = path.normcase(tb[i][0])
by
frame_file = os.path.normcase(tb[i][0])

solves the problem.

Logs

Output from Python output panel

.vscode/extensions/ms-python.python-0.9.0/pythonFiles/PythonTools/visualstudio_py_launcher_nodebug.py", line 117, in handle_exception
    frame_file = path.normcase(tb[i][0])
NameError: global name 'path' is not defined

Output from Console window (Help->Developer Tools menu)

@DonJayamanne DonJayamanne added awaiting 2-PR area-debugging bug Issue identified by VS Code Team member as probable bug labels Dec 18, 2017
@DonJayamanne DonJayamanne added this to the January 2018 milestone Dec 18, 2017
DonJayamanne added a commit that referenced this issue Dec 19, 2017
* Conditionally import `reflect-metadata` (fixes #432)
    * Once within the extension  
    * Once within the debugger  
    * Once within the unittests  
* Fully qualify the `path` module (fixes #454)
@DonJayamanne DonJayamanne removed this from the January 2018 milestone Dec 19, 2017
@DonJayamanne
Copy link

Released in 0.9.1

@brettcannon brettcannon added this to the December 2017 milestone Dec 19, 2017
DonJayamanne added a commit that referenced this issue Dec 19, 2017
* Conditionally import `reflect-metadata` (fixes #432)
    * Once within the extension  
    * Once within the debugger  
    * Once within the unittests  
* Fully qualify the `path` module (fixes #454)
* Update change log for release (#457)
@lock lock bot locked as resolved and limited conversation to collaborators Jul 12, 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
Projects
None yet
Development

No branches or pull requests

3 participants