2

Got a project recently converted to Gradle. Now I cannot debug the application.

I run the Debug Configuration - the app starts with a popup "Waiting for Debugger".

So I try to press the "Attach debugger to process"-button, select my process and nothing happens. Instead I get a

Unable to open debugger port java.net.connectexception "Operation Timed Out".

Anything obvious that I'm missing?

2
  • Are you trying to debug in the emulator or on a device? Commented Oct 19, 2015 at 21:01
  • @PaulNikonowicz emulator Commented Oct 20, 2015 at 8:12

1 Answer 1

2

On my part it was related to the internal networking. It seemed that

debugger <-> localhost connection couldn't be resolved. I was hinted by browsing through answers and executing lsof -i :8671 which was the debugger port for that session

idea    2244 username   41u  IPv4 0xe6ebe70eee4e0cd      0t0  TCP 192.168.1.74:54808->hajders:8617 (SYN_SENT)

As you can see the state was stuck SYN_SENT, which means the TCP connection could not be established. I added the following to my /etc/hosts file 127.0.0.1 hajders.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.