(Android Studio)如何调试我的代码? [英] (Android Studio) How to debug through my code only?
问题描述
当我尝试通过Android中的代码调试(使用Step Into,F7命令)时,调试器会带我浏览所有不想要的系统类。
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.
例如,当我在下面的第二行放置一个断点(即startActivity(ourIntent);)),而不是进入我的Activity(即myclass),执行点进入Activity.java> Instrumentation.java等等...所有系统类。
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);
添加Debugger>Stepping下的新模式选项被禁用
"Add new Pattern" option under "Debugger" > "Stepping" is disabled
推荐答案
转到 Android Studio> P参考文献>调试器>然后在底部点击带有问号的加号箭头表示
添加模式
。键入 android。*
,然后点击确定,然后单击应用。
Go to Android Studio > Preferences > Debugger > Stepping
then in the bottom click the plus arrow with the question mark that says Add Pattern
. Type android.*
and hit OK and then Apply.
这篇关于(Android Studio)如何调试我的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!