Xamarin Studio 中的断点未命中 [英] Breakpoints not getting hit in Xamarin Studio

查看:25
本文介绍了Xamarin Studio 中的断点未命中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的断点在 Xamarin Studio 中没有被击中.我不确定这是否与我的代码有关,但我感觉好像不是,因为我已经一遍又一遍地在我的项目中放置断点(在我知道它们绝对应该放在的地方)命中,并且在代码可以完美运行并且与我当前正在测试的功能完全无关的地方)并且在我调试时它们都没有得到确认.我没有禁用断点,也没有将它们添加到错误的位置.断点应该正常工作,但事实并非如此.我还要补充一点,我不允许在调试过程中暂停我的应用程序.我想你可以说我的 Xamarin Studio 中的调试器不工作,我不知道为什么.我相信我已经确定它与代码无关,但我仍然不能确定.请帮忙.谢谢你.

My breakpoints aren't getting hit in Xamarin Studio. I'm not sure if this has to do with my code, or not, but I feel as though it doesn't because I've tried over and over putting breakpoints all over my project (in places where I know they should definitely be hit, and in places that the code works perfectly and is completely unrelated to the feature I'm currently testing) and none of them are getting acknowledged when I debug. I don't have the breakpoints disabled, and I don't have them added in the wrong place. The breakpoints should work normally, and they're not. I'll also add that I'm not allowed to pause my application during the debugging process. I suppose you could say the debugger in my Xamarin Studio isn't working and I have no idea why. I believe I've determined it's unrelated to the code, but I can't be sure about that still. Please help. Thank you.

推荐答案

这是谷歌中最流行的问题:xamarin 中没有命中断点",所以经过一整天的反复试验,我要在这里发帖xamarin 版本 > 4.0.0.xxx 的此问题的解决方案.是的,遗憾的是这很简单.

It is the most popular question about: "breakpoints are not being hit in xamarin" in google, so after whole day of trial and error I am gonna post here a solution for this problem for xamarin versions > 4.0.0.xxx. Yes, sadly this is simple.

解决方案(此解决方案适用于 Visual Studio 中的 android 应用,但也适用于 xamarin Studio)

SOLUTION (This solution is for android app in visual studio, but should work in xamarin studio as well)

从调试"文件夹的路径中删除所有符号(通常:[.sln 文件的路径] [您的解决方案名称] inDebug):

Remove all symbols from the path to your "Debug" Folder (usually: [path to your .sln file] [your solution name] inDebug):

所以如果你得到例如:

G:My FilesProgrammingC# (+ JS)Test1ExamplesLINQ to ObjectsAndroidDemoAndroidDemoinDebug

改为:

G:My FilesProgrammingCSharpTest1ExamplesLINQ to ObjectsAndroidDemoAndroidDemoinDebug

对我来说,("和)"符号造成了麻烦(无论如何,谁在路径中使用这样的符号?)

For me "(" and ")" symbols were causing the trouble (Who is using such symbols in the path anyway right?)

要验证这是否有效,请打开调试文件夹,在 VIsual Studio 中选择清理解决方案"、重新编译解决方案"、部署".

To verify that this is working, open your debug folder, in VIsual Studio Select "Clean Solution", "Recompile Solution", "Deploy".

部署"操作应生成 *.mdb 文件,其中包含您的调试数据.如果它们存在,您现在应该可以在断点处停止.

"Deploy" action should generate *.mdb files which include your debugging data. If they are present, you should now be able to stop at breakpoints.

现在,您可以在需要调试某些内容时像往常一样简单地按 F5.

Now you can simply hit F5 like usual whenever you need to debug something.

这篇关于Xamarin Studio 中的断点未命中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆