Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Breakpoint does not belong to any class

In a some cases android studio stopped debugging process.

I have restart ide, emulator, but problem still appeared

enter image description here

like image 304
Vahe Gharibyan Avatar asked Nov 27 '20 11:11

Vahe Gharibyan


People also ask

Why does breakpoint not work?

If a source file has changed and the source no longer matches the code you're debugging, the debugger won't set breakpoints in the code by default. Normally, this problem happens when a source file is changed, but the source code wasn't rebuilt. To fix this issue, rebuild the project.

How do you activate a breakpoint?

To set a breakpoint in source code, click in the far left margin next to a line of code. You can also select the line and press F9, select Debug > Toggle Breakpoint, or right-click and select Breakpoint > Insert breakpoint. The breakpoint appears as a red dot in the left margin.

How do you skip a breakpoint?

To Disable All Breakpoints On the Debug menu, click Disable All Breakpoints. On the toolbar of the Breakpoints window, click the Disable All Breakpoints button.

Does breakpoint stop before or after line?

The breakpoint will stop your program just before it executes any of the code on that line. Set a breakpoint at line linenum in source file filename . Set a breakpoint at entry to function function found in file filename .


2 Answers

Try to clean the project and rebuild. It worked for me in Android Studio. You can find cleaning the project in Build tab.

like image 68
Siddharth Choudhary Avatar answered Oct 22 '22 23:10

Siddharth Choudhary


What worked for me was to right-click the file in the Project tree and select Mark as Plain Text then Mark as Kotlin from the same menu.

like image 7
Adrian Avatar answered Oct 22 '22 23:10

Adrian