Sometimes restarting your ADB server can help resolve connection issues. You can do this with:
adb kill-server adb start-server
To check if the debugger is attached you can run:
jinfo <pid>