Visual Studio skips all other lines when debugging

I am trying to execute my code now, Visual Studio skips every other line.

(I know this is all because when I have a ForEach loop, it will fall into the lines that it skipped in subsequent iterations.)

Is there any logical reason Visual Studio skips all the rest of the lines?

UPDATE: I have added youtube video of this event here . This only happens in this decision. I tried to restore, clean, and then restore ... I'm at a loss what to do.

UPDATE: A few comments requested a sample code. I am posting one, but I really don't think this code is a problem. I have many thousands of lines of code, and I skip lines wherever I set a breakpoint.

Here is an example of code that might just somehow affect:

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++; } 

Things I tried:

  • Rebooting
  • Delete the folder that contains the source code and get it again from Source Control.
  • Switching from Debug to Release and back to Debug (clears Rebuilds each time)
  • Clean and rebuild in debug mode.
+4
source share
1 answer

It turns out that it was an extension that was the culprit. I installed the beta version of the Bug Aid tool.

It seems that this problem arose immediately after completing my trial license.

I do not know if this is a direct consequence. But when I removed Bug Aid, my debugging no longer skipped lines.

Thanks to all the commentators who tried to help me figure this out.

+3
source

Source: https://habr.com/ru/post/1391711/


All Articles