我只是在Visual Studio 2015 IDE中调试C ++代码时观察到一个明显的错误。这是一个众所周知的问题吗?
当进行步骤(F10)时,左侧的黄色箭头应该指向下一步中要执行的当前位置,似乎错位了几行。看图像
注意“局部”面板中的红色值,表示sqlStatement
变量刚刚更改。这意味着黄色箭头实际上应该放在ret = SqlExecDirect(...
。仔细遵循源代码中的调试步骤,我可以看到当前点确实比黄色箭头指向的位置更远。
关于VS的信息 - 从关于对话框中捕获 - 如下:
Microsoft Visual Studio Professional 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01055
Installed Version: Professional
Visual Basic 2015 00322-40000-00000-AA650
Microsoft Visual Basic 2015
Visual C# 2015 00322-40000-00000-AA650
Microsoft Visual C# 2015
Visual C++ 2015 00322-40000-00000-AA650
Microsoft Visual C++ 2015
Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2015.1 (Beta8) 14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)
ASP.NET Web Frameworks and Tools 2012.2 4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563
ASP.NET Web Frameworks and Tools 2013 5.2.30624.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
DevExpress.DeploymentTool 1.0
A useful tool for deploying DevExpress assemblies.
KofePackagePackage Extension 1.0
KofePackagePackage Visual Studio Extension Detailed Info
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers
NuGet Package Manager 3.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENU
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
Python Tools for Visual Studio 2.2.31105.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.
Python Tools for Visual Studio - Django Integration 2.2.31105.00
Provides templates and integration for the Django web framework.
Python Tools for Visual Studio - Profiling Support 2.2.31105.00
Profiling support for Python projects.
SQL Server Data Tools 14.0.50717.0
Microsoft SQL Server Data Tools
TypeScript 1.7.4.0
TypeScript for Microsoft Visual Studio
Visual C++ for Cross Platform Mobile Development 1.0
Visual C++ for Cross Platform Mobile Development
Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.
XtraReports package 1.0
XtraReports package
答案 0 :(得分:2)
我敢回答我自己的问题,因为如果没有确切的消息来源和情况,有人不可能找到它。
我还使用Git作为VCS(从官方http://git-scm.com/安装)。我也设置了Git core.autocrlf=false
。可能是我用另一个编辑器(Notepad ++)或其他东西触及了源代码......
关闭解决方案,关闭Visual Studio,再次启动Visual Studio并打开项目时,Visual Studio警告混合行结尾(CR LF)。确认建议的修复后,问题就消失了。
如果设置黄色箭头的代码以不同于编辑器其余部分的方式计算行数(编辑器窗口在行结尾混合时更宽容),这是有意义的。
由于Visual Studio有自己的Git支持,在各种软件层的合作过程中可能会混淆。