Reputation: 4595
I am using Retrofit in my Application, like this:
beforeFubar();
MyRetrofitApi.getFoo(new Callback<Foo>() {
@Override
public void success(Foo arg0, Response arg1) {
successFubar();
}
@Override
public void failure(RetrofitError arg0) {
failureFubar();
}
});
I put my breakpoints at
beforeFubar()
,successFubar()
failureFubar()
Breakpoint at beforeFubar()
gets called correctly and executions stops
BUT
Breakpoints at successFubar()
and failureFubar()
do not get called (but they are executed)
Please, what am I missing here?
EDIT
it seems that the issue gets solved if I set Suspend All when I set the breakpoint.
Please what is your experience? Does this solve the problem?
Upvotes: 10
Views: 1960
Reputation: 583
just update classpath 'com.android.tools.build:gradle:4.1.2' to the latest version if it dosent work , you must upgrade your android studio to the latest version
Upvotes: 0
Reputation: 6160
Because of your ADB (Android Debug Bridge) configuration and settings this problem may happen.
Manipulate following solutions according to your conditions:
adb kill-server
adb start-server
Upvotes: 0
Reputation: 33398
Similar issue was reported in the past and seems to get fixed by adding a call to waitForDebugger() just prior to the line with the breakpoint active.
Source : How to debug android callbacks?
Upvotes: 1