Skip to content

Set env to extensionHost type in launch.json did not work #22150

@leozdgao

Description

@leozdgao
  • VSCode Version: 1.10.1
  • OS Version: MacOS 10.12.3

Steps to Reproduce:

I'm working on a vscode extension development, and my launch.json here:

{
    "version": "0.1.0",
    "configurations": [
        {
            "name": "Launch Extension",
            "type": "extensionHost",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
            "stopOnEntry": false,
            "env": {
                "NODE_ENV": "development"
            }
        }
    ]
}

And env seems not to be set. I try to follow the prompt here:

"node2" is no longer supported, use "node" instead and set the "protocol" attribute to "inspector".

And modify my launch.json like this:

{
    "version": "0.1.0",
    "configurations": [
        {
            "name": "Launch Extension",
            "type": "node",
            "protocol": "inspector",
            "request": "launch",
            "runtimeExecutable": "${execPath}",
            "args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
            "stopOnEntry": false,
            "env": {
                "NODE_ENV": "development"
            }
        }
    ]
}

But got the connection timeout error here:

Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:28486).

Metadata

Metadata

Assignees

Labels

debugDebug viewlet, configurations, breakpoints, adapter issuesfeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions