(Android Studio) How to debug through my code only

2019-01-16 07:15发布

When I try to debug through my code in Android (using Step Into, F7 command), the debugger takes me through all system classes, which I do not want.

For example, when I place a breakpoint at the 2nd line below (i.e. "startActivity(ourIntent);"), instead of going into my Activity (i.e. "myclass), the execution point goes into Activity.java > Instrumentation.java, etc... all system classes.

I dont want that. I only want to step through my code that I have written.

What is a way to achieve this?

        Intent ourIntent = new Intent(MainActivity.this, "com.practice.gamesbook.myclass");
        startActivity(ourIntent);

"Add new Pattern" option under "Debugger" > "Stepping" is disabled

enter image description here

7条回答
男人必须洒脱
2楼-- · 2019-01-16 08:01

Shift-F11 to step out of the method helps too.

查看更多
登录 后发表回答