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 167683

Summary: "Debug Test File" fails on 6.7RC3, works on 6.5.1
Product: debugger Reporter: briantd <briantd>
Component: CodeAssignee: issues@debugger <issues>
Status: CLOSED WORKSFORME    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Macintosh   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description briantd 2009-06-26 01:07:09 UTC
I am unable to debug a test file using Netbeans 6.7RC3.  However in Netbeans 6.5.1 this works fine.

The test file is written with JUnit4.  Whenever I select "Debug->Debug Test File" on it, the following appears in the console:

ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Java Result: 1
debug-test:
BUILD SUCCESSFUL (total time: 3 seconds)

Btw, I much prefer right-click "Debug" in 6.5.1 -- I see no advantage to breaking out test file debugging into a separate debug menu option in 6.7.
Comment 1 Martin Entlicher 2009-06-29 13:43:48 UTC
transport error 202: connect failed: Connection refused - this means that the debugger can not connect to the debuggee.
It's not apparent at all what might be the problem.

Do you use the same computer and same JDK for NB 6.5.1 and NB 6.7 ?

Can you debug the project or other files?

BTW:
I also prefer the right-click, but unfortunately it looks like I was the only one who does not like the current state.
Comment 2 briantd 2009-06-29 14:21:10 UTC
To answer your questions:
* Both NB6.5.1 and NB6.7.RC3 are installed on the same Macbook Pro.
* Using NB6.7RC3, I am able to debug other non-test files in the project, and the project itself.

Here's what works:
NetBeans: JPDA Listening Start...
JPDA Address: bdonaldson.local:65468
Port:65468
NetBeans: Executing 'mvn -Dexec.args=-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=65468 -classpath %classpath 
com.trulia.indexing.IndexFromQueue -Djpda.listen=true -Djpda.address=65468 -
Dexec.executable=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java -Dnetbeans.execution=true --fail-fast process-classes 
org.codehaus.mojo:exec-maven-plugin:1.1:exec'
NetBeans:      JAVA_HOME =/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
Scanning for projects...
Comment 3 briantd 2009-07-28 20:18:01 UTC
Just thought I'd add that this is still an issue even with the latest 6.7.1.  The error message is unchanged.

Comment 4 Vojtech Sigler 2009-09-18 11:46:27 UTC
I'm not sure this is still incomplete since there is some information added. Looks like there's maven involved, could be
a maven problem. I was not able to reproduce, my test files can be debugged without problems.

Please re-evaluate.
Comment 5 Martin Entlicher 2009-11-16 06:58:13 UTC
In 6.8 dev build 200911160201 it works fine for me. So perhaps it's already fixed.
Do you have Compile On Save turned on? I've tested it with both "Disabled" and "For both application and test execution". In both cases debugger started fine.

Can you please verify in NB 6.8?
Comment 6 Marian Mirilovic 2010-05-26 11:43:56 UTC
worksforme is the correct resolution.
I'm also not able to reproduce it in NB 6.9 Rc1