Android 如何在 jelly bean 中使用“选择调试应用程序”和“等待调试器”新功能?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11947640/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to use "Select debug app" and "wait for debugger" new feature in jelly bean?
提问by gladman
"Select debug app" and "Wait for debugger" are new feature in Jelly Bean, does someone know how to use these new features?
“选择调试应用程序”和“等待调试器”是 Jelly Bean 中的新功能,有人知道如何使用这些新功能吗?
回答by Brent
I found the answer here: http://developer.android.com/tools/debugging/debugging-devtools.html
我在这里找到了答案:http: //developer.android.com/tools/debugging/debugging-devtools.html
Lets you select the application to debug. You do not need to set this to attach a debugger, but setting this value has two effects:
- It will prevent Android from throwing an error if you pause on a breakpoint for a long time while debugging.
- It will enable you to select the Wait for Debugger option to pause application startup until your debugger attaches (described next).
允许您选择要调试的应用程序。你不需要设置它来附加调试器,但设置这个值有两个效果:
- 如果您在调试时在断点处暂停很长时间,它将防止 Android 抛出错误。
- 它将使您能够选择等待调试器选项以暂停应用程序启动,直到您的调试器连接(如下所述)。
回答by gabriel
It is a mystery to me also, but I'll share my experience. I cannot see that these options change the phone's behavior. Regardless of the settings I choose, the Galaxy Nexus behaves like my older phones that do not have the settings.
这对我来说也是个谜,但我会分享我的经验。我看不出这些选项会改变手机的行为。无论我选择何种设置,Galaxy Nexus 的行为都与我没有这些设置的旧手机一样。
"Waiting for debugger" is a dialog that I see whenever I start running an app from Eclipse. It stays up for a while, and then my app starts running. This has been the case since I started Android development, and it still works that way on my old and new devices, regardless of the setting.
“等待调试器”是我在 Eclipse 中开始运行应用程序时看到的对话框。它会保持一段时间,然后我的应用程序开始运行。自从我开始 Android 开发以来就是这种情况,无论设置如何,它仍然可以在我的旧设备和新设备上运行。
If I click on "Select Debug App", it allows me to select an app from the already installed apps on my phone that allow debugging, which are the apps that I wrote myself.
如果我单击“选择调试应用程序”,它允许我从手机上已安装的允许调试的应用程序中选择一个应用程序,这些应用程序是我自己编写的应用程序。
On my Galaxy Nexus it does not matter whether I select "Nothing" or one of my debuggable apps, I can still debug any app from Eclipse. I cannot even see a difference in time it takes to load an app over the ADB connection.
在我的 Galaxy Nexus 上,无论我选择“Nothing”还是我的可调试应用程序之一,我仍然可以从 Eclipse 调试任何应用程序。我什至看不到通过 ADB 连接加载应用程序所需的时间差异。