forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
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
Description
Environment data
- VS Code version: 1.27.2
- Extension version (available under the Extensions sidebar): 2018.8.0
- OS and version: Win 10
- Python version (& distribution if applicable, e.g. Anaconda): Any
- Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Any
- Relevant/affected Python packages and their versions: XXX
Actual behavior
Running script with "Start without debugging" fails to load local dependencies, but works properly in debugging mode.
Expected behavior
To run equally as it runs when in debugging mode.
Steps to reproduce:
- Create two sample scripts, where one uses 'main'.
main.py:
import callable
def main():
print(callable.MY_NAME)
if __name__ == '__main__':
main()
callable.py:
MY_NAME="Igor"
- Try to execute it without debugging - It fails loading dependencies.
Logs
Output for Python in the Output panel (View→Output, change the drop-down the upper-right of the Output panel to Python)
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)
Output from Console under the Developer Tools panel (toggle Developer Tools on under Help)
This output reflects the other issue, but I think it's not related with the above issue.
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