Skip to content

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

@alonke

Description

@alonke

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-debuggingbugIssue identified by VS Code Team member as probable bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions