Debug As unable to attach

Hi

We are a rookie team and trying to use Java. Also new to Eclipse and Java. The latest image and JRE have been installed. The driver station and Dashboard work. The Run As works fine, the program downloads. But…

The Debug As will not work. I had this working for 2016 version (trying to get up to speed last year). This is happening on both of the computers so it must be something we’ve missed.

I’ve searched about but having found anything related. Help would be much appreciated.

The Error Log is

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:50:46.699
!MESSAGE Running ant file: C:\Users\WarriorBot\workspace\Getting Started\build.xml

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:50:46.704
!MESSAGE Targets: deploy, Mode: run

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:51:08.231
!MESSAGE Running ant file: C:\Users\WarriorBot\workspace\Getting Started\build.xml

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:51:08.238
!MESSAGE Targets: debug-deploy, Mode: debug

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:51:08.325
!MESSAGE {port=8348, hostname=roborio-6421-FRC.local}

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:51:08.333
!MESSAGE Attemping to attach debugger…

!ENTRY WPILib_Java_Robot_Development 4 0 2017-01-11 23:51:10.199
!MESSAGE Unable to attach debugger. 19 attempts remain - waiting 2 second(s) before retrying…

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:52:04.479
!MESSAGE Attemping to attach debugger…

!ENTRY WPILib_Java_Robot_Development 4 0 2017-01-11 23:52:05.492
!MESSAGE Unable to attach debugger. 1 attempts remain - waiting 2 second(s) before retrying…

!ENTRY WPILib_Java_Robot_Development 1 0 2017-01-11 23:52:07.502
!MESSAGE Attemping to attach debugger…

!ENTRY WPILib_Java_Robot_Development 4 0 2017-01-11 23:52:08.517
!MESSAGE Debug attach failed
!STACK 1
org.eclipse.core.runtime.CoreException: Failed to connect to remote VM. Connection refused.
at org.eclipse.jdt.internal.launching.SocketAttachConnector.abort(SocketAttachConnector.java:98)
at org.eclipse.jdt.internal.launching.SocketAttachConnector.connect(SocketAttachConnector.java:155)
at org.eclipse.jdt.internal.launching.JavaRemoteApplicationLaunchConfigurationDelegate.launch(JavaRemoteApplicationLaunchConfigurationDelegate.java:85)

at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)
!SUBENTRY 1 org.eclipse.jdt.launching 4 113 2017-01-11 23:52:08.518
!MESSAGE Failed to connect to remote VM. Connection refused.
!STACK 0
java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at java.net.Socket.<init>(Unknown Source)
at org.eclipse.jdi.internal.connect.SocketTransportService$2.run(SocketTransportService.java:148)
at java.lang.Thread.run(Unknown Source)

I should also mention this is on Windows 10 Pro x64, the firewall was both enabled and disabled (on both public and private), everything was set to DHCP and I tried running Eclipse as admin. All the 2016 NI stuff was removed and I’m using Neon.2 (freshly downloaded), the wpilib Java and C++ plugins are version 2017.1.1, the jre 1.8.0_111.

Might be similar to what i’m seeing in https://www.chiefdelphi.com/forums/showthread.php?t=153552 (which I don’t know what’s going on) - the error log you posted, did you get that from the console window in eclipse?

It doesn’t appear in the console. This came from the Problem Log, you have to go to the Window>Views. Otherwise there is nothing to indicate that it failed. I had someone else setup a computer and RoboRio and the same problem occurred. I don’t think it’s something we’re doing.

Cloning from the other thread to keep this concise:

Dang. Any errors any further up in your error log? I am not very well versed in the debugging deploy, but I think the fundamental process involves starting the JVM on the RIO with a specially-named file (wpilib/java/current/ant/frcdebug) in a special directory which is a flag to the program to start in debugging mode (ie, ready to connect to a remote debugging device like your computer).

Any issues deploying “frcdebug” or running the contents of “robotDebugCommand” might result in the error you’re seeing.

I attempted some debug deploys again today with the updates I made the PR for in the ant build.xml. Although the build seems to complete without error, I am now seeing the same issue you’re seeing where the debugger cannot connect.