简体   繁体   English

断点没有被击中?

[英]BreakPoints not being hit?

I have been running and debugging my android app for quite a while now. 我已经运行和调试我的Android应用程序已有相当一段时间了。 All of a sudden I many of the break point I am setting are not being hit. 突然间,我要设置的许多断点都没有被击中。 I know the code is executed because of log messages. 我知道代码是由于日志消息而执行的。 I have noticed that once the breakpoint is passed for the first time eclipse adds a little check mark next to it.. 我注意到,第一次通过断点时,eclipse会在其旁边添加一个复选标记。

I have tried rebuilding, cleaning and reopening eclipse... Noting helped.. 我曾尝试过重建,清洁和重新打开月食。

Does anyone know how to solve this? 有谁知道如何解决这个问题?

Haha it's silly. 哈哈,真傻。 My co-worker had the same problem when she showed me the top answer for this post. 我的同事在给我看这篇文章的最佳答案时遇到了同样的问题。 I am not sure how this happens or if this is what happened with you but if you click on the "Run" menu, you will see that "Skip all breakpoints" has a check on its left. 我不确定这是怎么发生的,或者这是怎么回事,但是如果您单击“运行”菜单,您将看到“跳过所有断点”左侧有一个选中项。 Uncheck that and you are good to go. 取消选中该选项,您就很好了。

In eclipse, is the breakpoint marker a filled circle or an open circle? 在日食中,断点标记是实心圆还是空心圆? Try right-clicking on the breakpoint marker and click "Toggle Breakpoint" to enable it if it disabled, which is the only explanation I can think of. 尝试右键单击断点标记,然后单击“切换断点”以将其启用(如果禁用),这是我能想到的唯一解释。

通过从调试代码中临时删除android:process=":remote"解决了问题。

I'm not sure if this is your solution, but this occasionally happens to me when my project has stopped building correctly after adding some code. 我不确定这是否是您的解决方案,但是当我的项目在添加一些代码后停止正确构建时,偶尔会发生这种情况。 You can check to make sure there are no Java project build problems by going into the menu options 'Windows' => 'Show View' => 'Markers' and check for 'Java Problem' errors. 您可以通过进入菜单选项'Windows'=>'Show View'=>'Markers'来检查以确保没有Java项目构建问题,并检查是否有“ Java Problem”错误。

You can also attempt to close Eclipse and re-open the application, I've had many strange Eclipse bugs remedied by an application or system restart. 您也可以尝试关闭Eclipse并重新打开应用程序,我遇到了许多奇怪的Eclipse错误,这些错误是由应用程序或系统重新启动所纠正的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM