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.

Bug 259040 - Node.js 6.0 cannot be debugged
Summary: Node.js 6.0 cannot be debugged
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 8.2
Hardware: PC Linux
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-28 05:29 UTC by Tomas Mysik
Modified: 2016-04-30 01:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2016-04-28 05:29:48 UTC
Today, I installed latest stable version of node.js (6.0). NetBeans can run project without any problem, but debugger does not work. Could you please have a look at it? I got this exception [1].

Thanks.

Product Version: NetBeans IDE Dev (Build 20160427-d3ec1f4bace5)
Updates: Updates available
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Linux version 4.2.0-35-generic running on amd64; UTF-8; cs_CZ (nb)

[1]
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: Spojení odmítnuto
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        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.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:596)
        at org.netbeans.modules.javascript.nodejs.exec.NodeExecutable$LineConvertorImpl$1.run(NodeExecutable.java:564)
        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)
Comment 1 Tomas Mysik 2016-04-28 05:31:55 UTC
Please, let me know if the problem is in the project support, I would fix it.

Thanks!
Comment 2 Tomas Mysik 2016-04-28 05:38:35 UTC
I just noticed that the "debugger line" [1] is now written to STDERR (and not STDOUT as it used to). Will fix it.

Thanks.
[1] debugger listening on port
Comment 3 Tomas Mysik 2016-04-28 05:46:12 UTC
(In reply to Tomas Mysik from comment #2)
> I just noticed that the "debugger line" [1] is now written to STDERR (and
> not STDOUT as it used to). Will fix it.

This is fixed now. However, the problem with debugger itself still exists, of course.

Thanks.

http://hg.netbeans.org/web-main/rev/f3f4b02045e8
Comment 4 Martin Entlicher 2016-04-28 16:47:44 UTC
I've tested a build with http://hg.netbeans.org/web-main/rev/f3f4b02045e8 and debugger works fine for me with node v6.0.0 on Ubuntu Linux.
I get no exceptions on the debugger start.
Can you please elaborate on what exactly are the problems after the port is read from err output?
I've only discovered two probably random errors that I'll investigate:
issue #259050 and issue #259051.
It looks, though, that these exceptions prevent from start of a new node debugging session. An IDE restart is necessary. Wasn't this the case for you as well?
Comment 5 Quality Engineering 2016-04-29 01:50:49 UTC
Integrated into 'main-silver', will be available in build *201604290002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f3f4b02045e8
User: Tomas Mysik <tmysik@netbeans.org>
Log: Part of #259040 - Node.js 6.0 cannot be debugged

Fix 'debugger timeout' problem.
Comment 6 Tomas Mysik 2016-04-29 05:47:18 UTC
Still does not work for me, the exception is the same as in my initial description. But closing, if it works for you :)

Thanks.
Comment 7 Martin Entlicher 2016-04-29 08:44:47 UTC
The change http://hg.netbeans.org/web-main/rev/f3f4b02045e8 is a source of faulty behavior. It starts the debugger twice.
I'll try to do something about it...
Comment 8 Tomas Mysik 2016-04-29 09:47:47 UTC
(In reply to Martin Entlicher from comment #7)
> The change http://hg.netbeans.org/web-main/rev/f3f4b02045e8 is a source of
> faulty behavior.

Martine, the behaviour for me is the same before and after this change (I made it yesterday).

> It starts the debugger twice.

How is it possible? It just waits for the "debugger" line (with 5 seconds timeout), newly not only on STDOUT but also on STDERR. I must be missing something...

We can discuss it next week face to face.

Thanks.
Comment 9 Tomas Mysik 2016-04-29 09:49:29 UTC
(In reply to Tomas Mysik from comment #8)
> How is it possible?

Sorry, I can see it now. I will rollback my change and do it properly. Thanks.
Comment 10 Martin Entlicher 2016-04-29 09:51:44 UTC
Fixed by 297281:ff653ed64130
http://hg.netbeans.org/web-main/rev/ff653ed64130
Comment 11 Quality Engineering 2016-04-30 01:59:05 UTC
Integrated into 'main-silver', will be available in build *201604300002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/ff653ed64130
User: mentlicher@netbeans.org
Log: #259040: Read from both stdout and stderr, but start debugger just once.