Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Layout inspector does not work while running Android app in Debug mode

My layout inspector does not work (aka does not renders the layout) when I am trying to run a UI Espresso test in DEBUG mode in Android Studio.

So when it's reaching my breakpoint the app just freezes and after a few click it will stops running with a crash that the app does not responding...

We have lots of dependency updates in our project (like kotlin, gradle plugin, etc.) and I also updated my Android Studio version from Bumblebee (2021.1.1) to Electric Eel (2022.1.1).

Before these changes I was able to put a breakpoint in a UI test and when it reached the breakpoint I was able to "continue" the scenario by manually clicking the app... (I know that if I would put a breakpoint into the DEV code then it's normal for the app to freeze because I actually stopped the DEV code execution. But I think it should work with UI TEST code breakpoints, and it used to work, but now it doesn't).

What could be the problem?

I've tried cold boot, wipe data, using other devices (even tablet, phone, landscape, portrait, different api levels, etc.)

like image 612
Krissinho Avatar asked Dec 06 '25 18:12

Krissinho


1 Answers

This happens when you suspend all threads instead of the thread at the breakpoint. This setting can be change by right clicking on the breakpoint.

Suspending only the thread will solve the issue.

enter image description here

like image 139
Tamás Kozmér Avatar answered Dec 08 '25 07:12

Tamás Kozmér



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!