在调试时,Visual Studio跳到每隔一行 [英] Visual Studio is skipping to every other line while debugging
问题描述
我现在尝试单步执行代码,Visual Studio跳过每隔一行.
I try to step through my code now, Visual Studio skips every other line.
(我知道这是彼此的,因为当我有一个ForEach循环时,它将达到在以后的迭代中跳过的行.)
(I know it is every other because when I have a ForEach loop it will hit the lines that it skipped on later iterations.)
Visual Studio是否有逻辑原因跳过其他每行?
Is there any logical reason for Visual Studio to skip every other line?
UPDATE: I have added a youtube video of this happening here. This only happens in this one solution. I have tried rebuilding, cleaning then rebuilding... I am at a loss for what to do.
更新:一些评论要求提供代码示例.我正在发布一个,但是我真的不认为代码是问题所在.我有成千上万行代码,并且在我放置断点的任何地方都跳过了行.
UPDATE: Several comments have asked for a code sample. I am posting one, but I really don't think the code is the issue. I have many thousands of lines of code and it is skipping lines anywhere I put a breakpoint.
这里是一个代码示例,以防万一它可能很重要:
Here is a code sample just incase it could somehow matter:
foreach (string commentText in comment.CommentLines)
{
// Set the base path for this segment
basePath = rootPath + XPathsForComment.OrderRoot.Expression + "[@Id='" + index + "']/";
// Sequence
XPathToXML.Set(document, basePath + XPathsForComment.Sequence.Expression, commentIndex.ToString());
// Comment Type
XPathToXML.Set(document, basePath + XPathsForComment.TypeCode.Expression, CommentCodes.CommentCode);
// Comment
XPathToXML.Set(document, basePath + XPathsForComment.TextAttribute.Expression, commentText);
// Empty xmlns
XPathToXML.Set(document, basePath + XPathsForComment.XmlnsAttribute.Expression, "");
commentIndex++;
index++;
}
我尝试过的事情:
- 重新启动
- 删除保存源的文件夹,然后再次从源代码管理"中获取它.
- 从Debug切换到Release,然后再回到Debug(每次都会清理一次Rebuild)
- 在调试中清理并重建.
推荐答案
原来是扩展程序的罪魁祸首.我已经安装了一个名为 Bug Aid 的工具的测试版.
Turns out it was a Extension that was the culprit. I had installed the beta of a tool called Bug Aid.
似乎当我的试用许可证用完后,这个问题就开始了.
Seems that this problem started right around when my Trial License ran out.
我不知道这是否直接造成影响.但是当我卸载Bug Aid时,我的调试不再跳过行.
I don't know if it is direct cause an effect. But when I uninstalled Bug Aid, my debugging was no longer skipping lines.
感谢所有试图帮助我解决这个问题的评论者.
Thanks to all the commenters who tried to help me figure this out.
这篇关于在调试时,Visual Studio跳到每隔一行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!