Skip to content

VSCode debugger cannot attach to npm version of NW.js #8303

@FunctionPoint

Description

@FunctionPoint

So I have working NW.js example app in VSCode latest on Windows 11 latest.

NW.js is installed as an npm package.
In the file launch.json there is this configuration line fo nwjs:
"runtimeExecutable": "${workspaceRoot}/node_modules/nw/nwjs/nw.exe" },
The app runs fine but breakpoints set in the code are never hit.

And after 10 seconds, VSCode gives the error:
Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:9222).

Now I download the current NW.js SDK version form the website,
and I extract it in the ./bin subfolder of my project.
In the file launch.json, I change the configuration line to:
"runtimeExecutable": "${workspaceRoot}/bin/nw.exe" },
Now the app also runs fine, and VSCode breaks on set breakpoints successfully.

Request:
Can the npm packaged version of NW.js be made identical to the download SDK version,
so it can be used for debugging with VSCode?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions