Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Debugger doesn't stop after code execution ends. #2556

Copy link
Copy link
@Balky79

Description

@Balky79
Issue body actions

Environment data

  • VS Code version: 1.27.1
  • Extension version (available under the Extensions sidebar): 2018.8.0
  • OS and version: Windows 10
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.7, Anaconda, Python 2.6...
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): virtualenv, conda, N/A
  • Relevant/affected Python packages and their versions: all above

Actual behavior

Running the python script fails to pick up depending local modules.
Debugging mode never finishes, and when stopped manually it causes an "error in debugger Banner" error.

Expected behavior

Everything to work as it worked with VS Code version 1.27.0

Steps to reproduce:

Create a blank .py script, and try to import script from the same folder.
Run your script.
Observe debugging banner / Trackback dump.

Logs

When used directly with a folder where python is installed:
Traceback (most recent call last): File "C:\Python35\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "C:\Python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 211, in <module> singlesession=args.single_session) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 203, in main run_main(addr, name, kind, *extra, **kwargs) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 37, in run_main runner(addr, name, kind == 'module', *extra, **kwargs) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\runner.py", line 32, in run set_trace=False) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1099, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1106, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "c:\!IgorBackup\python-automation-scripts\PyScripts\blankStart.py", line 9, in <module> import sqlite3_hello_world ImportError: No module named 'sqlite3_hello_world'

When used with Anaconda virtualenv:
Traceback (most recent call last): File "g:\Anaconda3\Lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "g:\Anaconda3\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 211, in <module> singlesession=args.single_session) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\__main__.py", line 203, in main run_main(addr, name, kind, *extra, **kwargs) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 37, in run_main runner(addr, name, kind == 'module', *extra, **kwargs) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\runner.py", line 32, in run set_trace=False) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1099, in run return self._exec(is_module, entry_point_fn, module_name, file, globals, locals) File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1106, in _exec pydev_imports.execfile(file, globals, locals) # execute the script File "c:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "c:\!IgorBackup\python-automation-scripts\PyScripts\blankStart.py", line 9, in <module> import sqlite3_hello_world ModuleNotFoundError: No module named 'sqlite3_hello_world'

msft-01
msft-02
msft-03

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)

console.ts:136 [Extension Host] Python Extension: Error in debugger Banner Error: Missing required @injectable annotation in: Random.
	at getTargets (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\planning\reflection_utils.js:20:15)
	at Object.getDependencies (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\planning\reflection_utils.js:11:19)
	at C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\planning\planner.js:106:51
	at Array.forEach (<anonymous>)
	at _createSubRequests (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\planning\planner.js:94:20)
	at Object.plan (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\planning\planner.js:129:9)
	at C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\container\container.js:316:37
	at Container._get (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\container\container.js:309:44)
	at Container.get (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\node_modules\inversify\lib\container\container.js:228:21)
	at ServiceContainer.get (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\ioc\container.js:28:89)
	at DebuggerBanner.<anonymous> (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:163:55)
	at Generator.next (<anonymous>)
	at C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:18:71
	at new Promise (<anonymous>)
	at __awaiter (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:14:12)
	at DebuggerBanner.getDebuggerLaunchThresholdCounter (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:158:16)
	at DebuggerBanner.<anonymous> (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:135:22)
	at Generator.next (<anonymous>)
	at C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:18:71
	at new Promise (<anonymous>)
	at __awaiter (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:14:12)
	at DebuggerBanner.passedThreshold (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:133:16)
	at DebuggerBanner.<anonymous> (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:72:30)
	at Generator.next (<anonymous>)
	at C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:18:71
	at new Promise (<anonymous>)
	at __awaiter (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:14:12)
	at DebuggerBanner.shouldShow (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:68:16)
	at DebuggerBanner.<anonymous> (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:188:37)
	at Generator.next (<anonymous>)
	at fulfilled (C:\Users\istojako\.vscode\extensions\ms-python.python-2018.8.0\out\client\debugger\banner.js:15:58)
	at <anonymous>

Metadata

Metadata

Assignees

Labels

area-debuggingbugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from posterIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.