Coder Social home page Coder Social logo

Comments (9)

b-hahn avatar b-hahn commented on June 14, 2024

I have the same issue:

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

from vscode-python.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

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.

from vscode-python.

db4 avatar db4 commented on June 14, 2024

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.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

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.

DonJayamanne avatar DonJayamanne commented on June 14, 2024

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

b-hahn avatar b-hahn commented on June 14, 2024

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

DonJayamanne avatar DonJayamanne commented on June 14, 2024

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

b-hahn avatar b-hahn commented on June 14, 2024

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

rob3c avatar rob3c commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.