Comments (9)
I have the same issue:
VS Code version 1.18
Python version: 2.7.14
OS: Ubuntu 14.04
from vscode-python.
vscode related to debugging (Start Debugging, Open Configurations etc.) stops working.
Please could you describe what you means by stops working
.
- Please could you provide the exact steps, such as:
- Opened a workspace with a python and javascript file
- Debugging javascript file works
- When debugging python file, the following errors are displayed ... (provide details of errors in logs)
- Please provide the following:
- Contents of the
launch.json
file - Sample python file being used
-
Please confirm there are no errors in the
Console window
, accessed fromHelp->Developer Tools
menu)
It sounds highly unlikely there are no errors in there. If debugging other languages does not work, then errors must be logged somewhere, also the Python extension should not affect other debuggers. -
Finally, please try uninstalling and re-installing the extension.
from vscode-python.
Ok, I'll be more specific.
I created a new directory and run code .
inside. It only contains .vscode/launch.json
with
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${file}"
}
]
}
Now I have 2 cases:
- Case 1 (vscode-python extension is disabled):
Choosing in vscode menu Debug->Open Configurations
opens launch.json
for editing - expected behavior
- Case 2 (vscode-python extension is enabled):
The same action silently fails: launch.json
is not opened, developers' console contains the following errors (sorry, I initially overlooked them):
shell.ts:459 [ms-python.python] Cannot read property 'value' of null: TypeError: Cannot read property 'value' of null
at Registry.get (C:\Users\dbely\.vscode\extensions\ms-python.python-0.8.0\out\client\common\registry.js:46:27)
at ChildProcess.<anonymous> (C:\Users\dbely\.vscode\extensions\ms-python.python-0.8.0\node_modules\winreg\lib\registry.js:664:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Socket.<anonymous> (internal/child_process.js:342:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at Pipe._handle.close [as _onclose] (net.js:510:12)
e.onUnexpectedError @ shell.ts:459
(anonymous) @ shell.ts:419
e.onUnexpectedError @ errors.ts:119
o @ errors.ts:138
e.$onUnexpectedError @ mainThreadErrors.ts:26
e.invoke @ abstractThreadService.ts:41
e._invokeHandler @ rpcProtocol.ts:109
e._receiveOneMessage @ rpcProtocol.ts:96
(anonymous) @ rpcProtocol.ts:32
(anonymous) @ rpcProtocol.ts:157
e.invoke @ callbackList.ts:36
e.fire @ event.ts:123
(anonymous) @ ipc.net.ts:82
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
shell.ts:459 [ms-python.python] Cannot read property 'value' of null: TypeError: Cannot read property 'value' of null
at Registry.get (C:\Users\dbely\.vscode\extensions\ms-python.python-0.8.0\out\client\common\registry.js:46:27)
at ChildProcess.<anonymous> (C:\Users\dbely\.vscode\extensions\ms-python.python-0.8.0\node_modules\winreg\lib\registry.js:664:7)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:194:7)
at maybeClose (internal/child_process.js:899:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
e.onUnexpectedError @ shell.ts:459
(anonymous) @ shell.ts:419
e.onUnexpectedError @ errors.ts:119
o @ errors.ts:138
e.$onUnexpectedError @ mainThreadErrors.ts:26
e.invoke @ abstractThreadService.ts:41
e._invokeHandler @ rpcProtocol.ts:109
e._receiveOneMessage @ rpcProtocol.ts:96
(anonymous) @ rpcProtocol.ts:32
(anonymous) @ rpcProtocol.ts:157
e.invoke @ callbackList.ts:36
e.fire @ event.ts:123
(anonymous) @ ipc.net.ts:82
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
Reinstalling the extension does not help.
I think this can be related to #57
from vscode-python.
Great, looks like there's an error and that's the problem. This isn't related to #57.
Thanks for the output from the console window.
from vscode-python.
@b-hahn
You must be experiencing some other issue. Please could you provide the contents of your Python
output panel and the console widow
(Help->Developer Tools menu)
There must be something in both, specially console window
.
from vscode-python.
@DonJayamanne Indeed it seems like my problem is different. I tried again and now I get the following: when I debug some python code it takes longer until it breaks at the beginning of the code. I then get the following error message in the console:
[Extension Host] rejected promise not handled within 1 second console.ts:123
t.log @ console.ts:123
t._logExtensionHostMessage @ extensionHost.ts:377
(anonymous) @ extensionHost.ts:202
emitTwo @ events.js:106
emit @ events.js:194
process.nextTick @ internal/child_process.js:766
_combinedTickCallback @ internal/process/next_tick.js:73
_tickCallback @ internal/process/next_tick.js:104
spawn ctags ENOENT: Error: spawn ctags ENOENT shell.ts:459
at exports._errnoException (util.js:1050:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
e.onUnexpectedError @ shell.ts:459
(anonymous) @ shell.ts:419
e.onUnexpectedError @ errors.ts:119
o @ errors.ts:138
e.$onUnexpectedError @ mainThreadErrors.ts:26
e.invoke @ abstractThreadService.ts:41
e._invokeHandler @ rpcProtocol.ts:109
e._receiveOneMessage @ rpcProtocol.ts:96
(anonymous) @ rpcProtocol.ts:32
(anonymous) @ rpcProtocol.ts:157
e.invoke @ callbackList.ts:36
e.fire @ event.ts:123
(anonymous) @ ipc.net.ts:82
emitOne @ events.js:96
emit @ events.js:191
readableAddChunk @ _stream_readable.js:178
Readable.push @ _stream_readable.js:136
onread @ net.js:560
console.ts:123 [Extension Host] activating extension
It then proceeds to debug as it used to before the update (don't know if I had the same error then as well).
If I run the python file without debugging then it runs once but I can't run it a second time, either with or without debugging. The little blue status bar on the top left keeps on moving, as if the process hadn't terminated, although the code seems to get to the last line and it worked before the update. This happens with one-line print statement as well so I don't think it's my code. I have to restart VS Code to run it again. Here I don't get any errors either in the console or the python output window.
I'm using this launch.json:
...
{
"name": "Python",
"type": "python",
"request": "launch",
"stopOnEntry": true,
"pythonPath": "${config:python.pythonPath}",
"program": "${file}",
"cwd": "${workspaceRoot}",
"env": {},
"envFile": "${workspaceRoot}/.env",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
},
...
Let me know if you need anything else!
from vscode-python.
@b-hahn please could you create a separate issue for the problem you are experiencing (with all relevant information). Gets quite difficult to manage multiple problems from the same issue. Thanks.
One last thing, please try to add a screen shot of the error message.
from vscode-python.
@DonJayamanne Sure, I just created a separate issue. Regarding the screen shot, I don't get an error message so I can't really attach anything, I simply can't run code after I've used the "Start without Debugging" function once. Let me know if you need anything else!
from vscode-python.
I wish I were lucky enough to get an error message. It just hangs indefinitely for me in Code, and - surprisingly - trying to debug a python app in Code-Insiders starts an instance of Code instead of debugging my app! This is all with a configuration that's been working solidly for me for weeks now.
from vscode-python.
Related Issues (20)
- Lots of 404 errors in dev tools console HOT 1
- pythonTerminalEnvVarActivation shadows pyenv PATH HOT 8
- Explore how we can make test discovery more automatic HOT 4
- Native locator for global python installs and virtual environments
- not loading HOT 4
- Dynamically handle test framework on activation
- Starting in v2024.4.1, extension mangles vscode integrated terminal path HOT 3
- unittest: `sys.path` is different when running from terminal vs test UI HOT 4
- Possible Python Traceback issue - M1 Mac Rosetta HOT 14
- option to configure experiments in the workspace `settings.json`
- Error: Stopping the server timed out HOT 2
- Show environment creation prompt when user runs `pip install` when global env is selected
- Tests do not start when working Remote HOT 13
- Unable to Find Pipenv Virtual Environment in VSCode Jupyter Notebook HOT 8
- Select interpreter via file dialog does not properly load virtual env HOT 2
- `Show in Active File Only` doesn't automatically open the full tree. HOT 2
- Error: Loading Python extension HOT 1
- Error occurs with "Python: Report Issue..." if certain extension is loaded HOT 5
- Unable to debug if script file path contains certain characters HOT 3
- Unable to debug twice on the same terminal (under certain conditions) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-python.