Debugging with Android Studio stuck at Waiting For Debugger forever
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
When an Android app sits on "Waiting For Debugger" forever, the process usually launched in debug mode but the debugger never attached correctly. The fix is rarely inside your business logic. It is usually an ADB, device, process, or run-configuration issue.
What the Message Means
That message appears when the app process is paused waiting for a JDWP debugger connection. If Android Studio cannot attach, the app just sits there.
Common causes include:
- stale ADB state
- wrong process or run configuration
- a previous debugger session still hanging around
- device-side "wait for debugger" developer option
- mismatched debug build or signing state
First Checks
Start with the fastest resets:
Then:
- unplug and reconnect the device if using USB
- verify the device is authorized for debugging
- confirm you are launching a debug build, not release
- try
Runonce, thenDebug
This clears a surprising number of stuck sessions.
Check the Run Configuration
In Android Studio, confirm the selected app module and debugger type are correct. If the wrong process is targeted or the wrong variant is selected, the IDE may wait on an attach target that never becomes ready.
Also inspect the manifest and Gradle setup to ensure the build is actually debuggable in the chosen variant.
Device Developer Options Can Interfere
On the device, there is a developer option named "Wait for debugger" or similar behavior depending on Android version. If that was enabled manually for your package, the app may pause even when Android Studio is not attaching the way you expect.
If debugging has become stuck repeatedly:
- disable that device option
- clear the selected debug application on the device
- relaunch from Android Studio cleanly
Logcat and Process Checks
Use logcat to see whether the app is crashing early or whether it really is just waiting:
Sometimes the app never reaches the point where Studio expects to attach because it crashes during startup, and the visible symptom still looks like debugger trouble.
You can also inspect running processes:
If the process appears and disappears immediately, the issue may be a startup crash rather than debugger attach failure.
Clean State If Needed
If the project state is suspicious, try:
- clean and rebuild the project
- uninstall the app from the device
- invalidate IDE caches only if simpler fixes fail
Reinstalling helps when an old app process, incompatible install, or stale debug session is confusing the tooling.
Common Pitfalls
The biggest mistake is assuming "Waiting For Debugger" means the debugger is working and your code is the problem. Often the debugger is not attached at all.
Another mistake is debugging the wrong build variant. A release variant or a non-debuggable configuration will not behave as expected.
A third issue is forgetting device-level developer settings. The phone can be forcing debugger wait behavior independently of the IDE.
Summary
- The message means the app is paused waiting for debugger attach.
- Start by resetting ADB, the app process, and the USB or device connection.
- Verify the selected module, process, and debug build variant.
- Check device developer options for package-level wait-for-debugger behavior.
- Use logcat to distinguish debugger attach failure from an early app crash.

