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

vscode-python 0.8.0 makes all debugging services of vscode 1.18 non-working #58

Closed
db4 opened this issue Nov 13, 2017 · 9 comments · Fixed by #224
Closed

vscode-python 0.8.0 makes all debugging services of vscode 1.18 non-working #58

db4 opened this issue Nov 13, 2017 · 9 comments · Fixed by #224
Labels
area-debugging bug Issue identified by VS Code Team member as probable bug
Milestone

Comments

@db4
Copy link

db4 commented Nov 13, 2017

Environment data

VS Code version: 1.18
Python Extension version: 0.8.0
Python Version: 3.6.3
OS and version: Windows_NT x64 10.0.15063

Actual behavior

Once the extension is enabled everything in vscode related to debugging (Start Debugging, Open Configurations etc.) stops working. All other languages (e.g. C++) are affected as well. Disabling vscode-python extension restores normal operation. It worked before upgrade to 1.18/0.8.0 without a problem.

Expected behavior

Working debug

Steps to reproduce:

  • Select from menu Debug -> Open Configurations. Nothing happens.

Logs

Output from Python output panel

(none printed where)

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

(none printed where)
@b-hahn
Copy link

b-hahn commented Nov 13, 2017

I have the same issue:

VS Code version 1.18
Python version: 2.7.14
OS: Ubuntu 14.04

@DonJayamanne
Copy link

vscode related to debugging (Start Debugging, Open Configurations etc.) stops working.

Please could you describe what you means by stops working.

  1. 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)
  1. Please provide the following:
  • Contents of the launch.json file
  • Sample python file being used
  1. Please confirm there are no errors in the Console window, accessed from Help->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.

  2. Finally, please try uninstalling and re-installing the extension.

@db4
Copy link
Author

db4 commented Nov 14, 2017

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

@DonJayamanne
Copy link

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.

@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label Nov 14, 2017
@DonJayamanne
Copy link

@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.

@b-hahn
Copy link

b-hahn commented Nov 15, 2017

@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!

@DonJayamanne
Copy link

@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.

@b-hahn
Copy link

b-hahn commented Nov 16, 2017

@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!

@rob3c
Copy link

rob3c commented Nov 16, 2017

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.

@DonJayamanne DonJayamanne added this to the December 2017 milestone Nov 17, 2017
DonJayamanne added a commit that referenced this issue Nov 22, 2017
fixes #58, check if valid value is returned
@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

Successfully merging a pull request may close this issue.

5 participants