Skip to content

Cannot debug Node.js applications in development environment #9559

Closed

Description

  • VSCode Version: Master Branch
  • OS Version: OS X Elcapitan 10.11.6 (15G31)

Steps to Reproduce:

  1. Clone the master branch
  2. Run ./scripts/npm.sh install
  3. Open a folder with the javascript named test.js with a simple console.log statement
  4. Try to debug using the node debugger
  5. The following launch.json file gets created:
{
    "version": "0.2.0",
    "configurations": []
}
  1. Updated launch.json as follows:
{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch",
            "type": "node",
            "request": "launch",
            "program": "${workspaceRoot}/test.js",
            "stopOnEntry": false,
            "args": [],
            "cwd": "${workspaceRoot}",
            "preLaunchTask": null,
            "runtimeExecutable": null,
            "runtimeArgs": [
                "--nolazy"
            ],
            "env": {
                "NODE_ENV": "development"
            },
            "externalConsole": false,
            "sourceMaps": false,
            "outDir": null
        },
  1. Start debugging and then you get the following error:
No extension installed for 'node' debugging.

Is this the expected behaviour?
I was under the impression that built in extensions such as the node debugger would work out of the box.

Here's the output in the console window:

[56660:0721/120327:INFO:CONSOLE(222)] "%c[Extension Host] %cdebugger listening on port 5870", source: file:////<VscodePath>/out/vs/workbench/services/thread/electron-browser/threadService.js (222)
[56660:0721/120338:INFO:CONSOLE(80)] "No extension installed for 'node' debugging.: Error: No extension installed for 'node' debugging.
    at Object.create (file:////<VscodePath>/out/vs/base/common/errors.js:317:22)
    at file:////<VscodePath>/out/vs/workbench/parts/debug/electron-browser/debugService.js:557:67
    at ErrorPromise_then [as then] (file:////<VscodePath>/out/vs/base/common/winjs.base.raw.js:1436:50)
    at file:////<VscodePath>/out/vs/workbench/parts/debug/electron-browser/debugService.js:541:20
    at CompletePromise_ctor.CompletePromise_then [as then] (file:////<VscodePath>/out/vs/base/common/winjs.base.raw.js:1566:49)
    at DebugService.doCreateSession (file:////<VscodePath>/out/vs/workbench/parts/debug/electron-browser/debugService.js:480:16)
    at _this.runPreLaunchTask.then._this.messageService.show.message (file:////<VscodePath>/out/vs/workbench/parts/debug/electron-browser/debugService.js:450:38)
    at CompletePromise_ctor.CompletePromise_then [as then] (file:////<VscodePath>/out/vs/base/common/winjs.base.raw.js:1566:49)
    at file:////<VscodePath>/out/vs/workbench/parts/debug/electron-browser/debugService.js:445:76
    at CompletePromise_then [as then] (file:////<VscodePath>/out/vs/base/common/winjs.base.raw.js:1566:49)", source: file:////<VscodePath>/out/vs/workbench/services/message/browser/messageService.js (80)

Activity

  1. weinand commented on Jul 21, 2016

    @weinand
    Contributor

    Don Jayamanne (@DonJayamanne) yes, this is the expected behaviour. The node-debug extension lives in a different repository and is added to VS Code as part of the build process.
    If you just clone the VS Code repo, node-debug is missing.
    To fix this you can copy the node-debug extension folder from VS Code insider to ~/.vscode-oss-dev/extensions/

  2. added
    debug
    on Jul 21, 2016
  3. DonJayamanne commented on Jul 22, 2016

    @DonJayamanne
    ContributorAuthor
  4. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions