This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 164901 [details] messages.log When I try to debug a NodeJS application (clicking the toolbar icon), I get the following console output: "C:\Program Files\nodejs\node.exe" "--debug=9292" "C:\Source\Phone-Demo\SilImport\index.js" "config-dev" (node:9640) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead. Done. NodeJS is Version v8.1.3 >System Info: Product Version = NetBeans IDE 8.2 (Build 201609300101) (#5fd841261bf9) Operating System = Windows 10 version 10.0 running on amd64 Java; VM; Vendor = 1.8.0_144; Java HotSpot(TM) 64-Bit Server VM 25.144-b01; Oracle Corporation Runtime = Java(TM) SE Runtime Environment 1.8.0_144-b01 Relevant lines from messages.log: INFO [org.netbeans.modules.javascript.nodejs.exec.NodeExecutable]: Connect node.js debugger timeout elapsed INFO [org.netbeans.modules.javascript.nodejs.exec.NodeExecutable]: cannot run node.js debugger java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at java.net.Socket.connect(Socket.java:538) at java.net.Socket.<init>(Socket.java:434) at java.net.Socket.<init>(Socket.java:211) at org.netbeans.lib.v8debug.connection.ClientConnection.<init>(ClientConnection.java:117) at org.netbeans.modules.javascript.v8debug.V8Debugger.<init>(V8Debugger.java:158) at org.netbeans.modules.javascript.v8debug.V8Debugger.startSession(V8Debugger.java:140) at org.netbeans.modules.javascript.v8debug.api.Connector.connect(Connector.java:71) [catch] at org.netbeans.modules.javascript.nodejs.exec.NodeExecutable$LineConvertorImpl.connectDebugger(NodeExecutable.java:615) at org.netbeans.modules.javascript.nodejs.exec.NodeExecutable$LineConvertorImpl$1.run(NodeExecutable.java:583) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
Since NodeJS v8 will become the LTS soon (October 2017), it would be nice to make the debug command line parameters depend on the NodeJS version --debug for version < 7 (e.g. v6.11.2 LTS) --inspect for version >= 7
I am very impressed about NetBeans support of node.js. Imagine if something like this would happen with Java, that from one version to another, the debugger would start working.
Node v9.10.1 will not even run it, if --debug is used will just exit with msg: (node:23502) [DEP0062] DeprecationWarning: `node --debug` and `node --debug-brk` are invalid. Please use `node --inspect` or `node --inspect-brk` instead. So can't debug anything on node v9 in NetBeans IDE 8.2.