How to Fix Android Studio Debugging Not Working After Windows Update - Complete Troubleshooting Guide
Problem
After a Windows update, debugging stopped working in Android Studio. The app would run, but the debugger wouldn’t attach.
No error messages appeared in the console. The Debug tab showed the connection attempt, then just stopped. Breakpoints never triggered.
Environment
- Android Studio Hedgehog (2023.1.1)
- Windows 11 with recent update
- Android 13 (API 33) target device
- Gradle 8.0
What happened?
I was debugging my project normally. Then Windows pushed an update. After the restart, my project wouldn’t debug anymore.
The app installed and ran on my device, but breakpoints were ignored. The debug session never started.
I tried several things:
- Reverted to an earlier commit in git
- Disabled C++ native libraries (the project uses both Java and C++)
- Asked an AI assistant what was wrong
- Created a new test project
The new test project debugged fine. This told me the issue was specific to my existing project, not Android Studio itself.
The solution
After reading similar issues, I tried the simplest fix first:
Build → Clean ProjectWait for the clean operation to complete (check the progress bar in the bottom right).
Then run:
Build → Rebuild ProjectAfter the rebuild finished, I clicked the Debug button. The debugger attached, and breakpoints started working again.
That was it. Clean Project fixed the issue.
Why this happens
System updates can corrupt Gradle cache and build artifacts. Here’s what happens during a Windows update:
Windows Update ↓System files modified ↓File permissions change ↓Gradle cache becomes inconsistent ↓Debug artifacts corrupted ↓Debugger can't attachThe Clean Project operation deletes the build directory, which contains:
- Gradle cache files
- Compiled DEX files
- Debug symbols
- Temporary build artifacts
When you rebuild, fresh copies of all these files are created.
Alternative troubleshooting steps
If Clean Project doesn’t work, try these steps in order:
Check your run configuration
- Go to Run → Edit Configurations
- Verify the target device is correct
- Make sure “Debug” is selected under Build Variants
- Confirm “Run with adb” is enabled
Reset ADB
adb kill-serveradb start-serverCheck Gradle sync
Open View → Tool Windows → Build. Look at the Sync tab for any sync errors.
Use command line options
For more detailed build output, add these flags in Settings → Build, Execution, Deployment → Compiler:
--stacktrace # Shows detailed build errors--debug # Verbose Gradle output--info # Informational messagesVerify SDK paths
Sometimes system updates change the SDK path. Check in File → Settings → Appearance & Behavior → System Settings → Android SDK.
Preventing future issues
Here are habits that reduce the chance of this happening:
- Always close Android Studio before system updates
- Use “Build → Clean Project” periodically
- Keep Gradle wrapper updated
- Don’t force quit Android Studio during builds
- Use File → Invalidate Caches / Restart if things feel sluggish
Understanding the difference: Run vs Debug
When you “Run” an app, Android Studio builds and deploys it. When you “Debug”, it also attaches the Java Debugger Protocol (JDWP) agent to your running process.
The JDWP agent needs:
- Correct debug symbols in the build
- A valid socket connection to ADB
- Matching source code mappings
When build artifacts are corrupted, any of these can fail. Clean Project rebuilds all of them from scratch.
Summary
In this post, I explained how to fix Android Studio debugging issues that appear after Windows updates. The key point is using Clean Project to clear corrupted build artifacts that prevent the debugger from attaching to your running app.
If you experience this issue, try Clean Project first. It fixes the problem in most cases.
Final Words + More Resources
My intention with this article was to help others share my knowledge and experience. If you want to contact me, you can contact by email: Email me
Here are also the most important links from this article along with some further resources that will help you in this scope:
- 👨💻 Android Studio Build and Run App Guide
- 👨💻 Android Gradle Plugin Build Configuration
- 👨💻 Reddit Discussion on Android Debugging Issues
Oh, and if you found these resources useful, don’t forget to support me by starring the repo on GitHub!
Comments