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.
source share