Eclipse OH2 Remote Debugging

Tags: #<Tag:0x00007f6188d009f8> #<Tag:0x00007f6188d00818> #<Tag:0x00007f6188d005e8>

Hi,

I’m looking for a solution to debug a new developed binding directly on the device that will run it.
In Eclipse I created a Java Remote Application configuration with
Project: “” // I leave it empty
Connection type: Standard (Socket Attach)
Host:
Port: 5005.

OH2 is running in debug mode, with “Listening for transport dt_socket at address: 5005” message.

I think everything is correct but when I launch debug I obtain always

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Someone have idea how to resolve it?
Thanks

If you run locally - you need to enter localhost/127.0.0.1 into host field. If you run remote instance on external device then you need to enter IP address of this machine on which port is getting exposed.
As far I remember debugger port should be exposed to all interfaces. Usually there is small delay when debugging on remote machines which gets bigger with slower network. :wink:

Hello guys,

I seem to have a similar problem, I am trying to debug a bundle on a BeagleBoneBlack which is connected to my development machine, I try to open a remote debugger session similarly as @antoniolobefaro did:

 Project: bundle.name.here 
 Connection type: Standard (Socket Attach) 
 Host: 197.168.7.2 
 Port: 5005 

I ssh into my BeagleBone and start OH2 in debug mode with start_debug.sh before opening a debugging session on Eclipse, but I still get the same error as @antoniolobefaro has:

Failed to connect to remote VM. Connection refused.
Connection refused: connect

Any suggestions?