我尝试通过将断点放在以下位置来查找应用程序的入口点
onCreate在Activity.java内部,但在这一点上它从不中断。这是允许的还是可能的?
这里是我的断点所在
protected void onCreate(Bundle savedInstanceState) {
if (DEBUG_LIFECYCLE) Slog.v(TAG, "onCreate " + this + ": " + savedInstanceState);
if (mLastNonConfigurationInstances != null) {
mAllLoaderManagers = mLastNonConfigurationInstances.loaders;
}
--breakpoint here--->>>>>>>> if (mActivityInfo.parentActivityName != null) {
if (mActionBar == null) {
mEnableDefaultActionBarUp = true;
} else {
mActionBar.setDefaultDisplayHomeAsUpEnabled(true);
}
}
if (savedInstanceState != null) {
Parcelable p = savedInstanceState.getParcelable(FRAGMENTS_TAG);
mFragments.restoreAllState(p, mLastNonConfigurationInstances != null
? mLastNonConfigurationInstances.fragments : null);
}
mFragments.dispatchCreate();
getApplication().dispatchActivityCreated(this, savedInstanceState);
mCalled = true;
}我试图在super.onCreate()中中断,但当我进入时,它一进入就直接跳过了所有东西。
发布于 2014-07-18 04:07:47
不,您不能将其放在方法声明语句中(我认为这是正确的,没有任何用处)。您可以将断点放在代码语句的函数中。
发布于 2014-07-20 21:38:33
以下是执行此操作的步骤。
To create a method breakpoint using the Breakpoints dialog
1) On the main menu, choose Run | View Breakpoints, or press Ctrl+Shift+F8.
2) In the Breakpoints dialog box that opens, click add.
3) Select Method Breakpoint from the drop-down list.
4) In the Add Method Breakpoint dialog box, specify the class name pattern, including the package name, and the name of the desired method.
5)So doing, when the debugging session starts, the application will pause in all classes with the names matching the specified pattern, at the specified method.link将为您提供更多详细信息
https://stackoverflow.com/questions/24812526
复制相似问题