在调试期间,我试图查看StringBuilder的内容以便可视化它.我使用大量的HTML,我希望能够像在VS 2008中那样在HTML模式下查看内容.
正如您在附图中看到的那样,在2008年,我可以非常轻松地在我想要的行上的调试器中获得html模式.在2010年,我必须调用ToString()方法才能获得相同的能力.
我怎样才能在2010年获得2008年的能力?

谢谢.
请考虑这个简短的控制台应用代码.
static void Main(string[] args)
{
try
{
Action a = () =>
{
throw new ApplicationException("Oops");
};
var ar = a.BeginInvoke(null, null);
ar.AsyncWaitHandle.WaitOne();
try
{
a.EndInvoke(ar);
Console.WriteLine("No message");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
}
}
finally
{
Console.ReadKey();
}
}
Run Code Online (Sandbox Code Playgroud)
运行Visual Studio时会打破throw抱怨它未处理的问题.在调试器外部执行时,代码执行我期望的操作(显示"Oops").
我如何说服Visual Studio允许代码像在现实世界中那样执行?
c# multithreading exception-handling visual-studio-debugging visual-studio-2012
我正在使用优秀的Visual Studio Python工具在Visual Studio 2010中编写Python代码.我可以设置断点并逐步完成我的Python代码.但是,我无法进入Python的任何标准库代码(例如步入).print()
我注意到Python.org还为每个Python版本提供了 Visual Studio调试信息文件.这是一个包含.pdbPython版本文件的ZIP文件.我需要在Visual Studio 2010中配置什么才能使用这些.pdb文件进入Python的标准库代码?
在调试时,我有时会发现需要在监视窗口中比较对象引用,以查看两个变量是否实际引用了同一个对象.
使用C++和指针这很容易,但有没有办法用C#引用呢?
我无法在任何地方找到这个在线的描述.当我尝试运行和调试ASP.NET MVC3项目时,我从Visual Studio 2012 Pro收到此提示.我想知道:

visual-studio visual-studio-debugging asp.net-mvc-3 visual-studio-2012
我正在尝试调试 ASP.NET Core 框架中的防伪代码。
我已使用https://github.com/dotnet/aspnetcore/blob/master/docs/BuildFromSource.md中的说明使用调试配置成功构建了代码。
我已将源代码项目添加到我的测试项目中并引用它。
我检查过配置是否设置为调试。
我已确保已选中“抑制 JIT 优化”。
对于这两个项目,项目属性 -> 构建中的“优化代码”均未选中。
两个项目的“高级选项”(“构建”选项卡下)中的“调试信息”下拉列表已设置为“完整”。
但是,当我在 中命中断点时DefaultAntiforgeryTokenSerializer.Serialize(),在“监视”窗口中查看该方法的本地变量时,它会出现此错误:
无法获取本地或参数的值,因为它在此指令指针处不可用,可能是因为它已被优化掉
如何强制代码不被优化?
我正在使用 Visual Studio Enterprise 2019 v16.8.3。
我想在我的 WPF 应用程序中使用 Visual Studio 2019(版本 16.8.3)“Live Visual Tree Today”。所以我进入“工具”>>“选项”>>“调试”>>“常规”,惊讶地发现没有“启用 UI 调试工具”或类似的复选框。我知道它曾经在那里。现在不是了。
我浏览了所有其他调试选项,但在任何地方都看不到类似的选项。
当我现在调试时,虽然我可以调出“Live Visual Tree”窗口,但它告诉我“UI 调试已禁用,当前应用程序不支持,或者应用程序执行已暂停”。
如果这很重要的话,我会在没有暂停的情况下执行此操作。我的应用程序是 .NET 5.0,在 C# 中使用 WPF。
那么实时视觉树发生了什么?
在我的 xamarin Android 项目中,一切正常,直到我更新到 Visual Studio 2019 v16.9.0。
升级后,我能够成功构建项目,但是如果我尝试部署或调试到设备或模拟器,我会收到以下错误:
[构建日志的最后一部分]
Adding assembly reference for Xamarin.Firebase.Analytics.Impl, recursively...
Adding assembly reference for Xamarin.Firebase.Common, recursively...
Adding assembly reference for Xamarin.Firebase.Iid, recursively...
Adding assembly reference for Xamarin.Firebase.Iid.Interop, recursively...
Adding assembly reference for Xamarin.Firebase.Measurement.Connector, recursively...
Adding assembly reference for Xamarin.Firebase.Messaging, recursively...
Adding assembly reference for Xamarin.Forms.Core, recursively...
Adding assembly reference for Xamarin.Forms.Platform.Android, recursively...
Adding assembly reference for Xamarin.Forms.Platform, recursively...
Adding assembly reference for Xamarin.Forms.Xaml, recursively...
Adding assembly reference for Xamarin.Google.Android.Material, recursively...
Adding assembly reference for …Run Code Online (Sandbox Code Playgroud) visual-studio-debugging xamarin.android xamarin xamarin.forms visual-studio-2019
我有一个来自generator-express-no-stress-typescript模板的Yeoman脚手架项目。我需要对其进行调试,就像使用 Visual Studio Code 进行“逐步执行打字稿代码”一样(不,这对我来说还不够)。console.log()
根据文档我只需要发出
npm run dev:debug
Run Code Online (Sandbox Code Playgroud)
然后附上VSCode。问题是:如果我这样做,VSCode 将无法绑定断点。如果我让调试器在第一个执行行 ( "stopOnEntry": true) 上停止,它将停止在生成的 JavaScript 代码中,而不是源 TypeScript 代码中,并且/但选项卡标题中的文件名以斜体显示“index.ts”(不是 .js) 。
这是dev:debugpackage.json 中的脚本目标:
"dev:debug": "nodemon --exec \"node -r ts-node/register --inspect-brk\" server/index.ts | pino-pretty",
Run Code Online (Sandbox Code Playgroud)
这是我的“附加”配置launch.json:
{
"name": "Debug (Attach)",
"port": 9229,
"request": "attach",
"cwd": "${workspaceFolder}",
"sourceMaps": true,
"skipFiles": ["<node_internals>/**"],
"type": "node",
// "outFiles": ["${workspaceFolder}/dist/**/*.js"],
},
Run Code Online (Sandbox Code Playgroud)
由于这不起作用,我尝试了其他一些教程,其中一个(我不记得是哪一个)让我将以下配置添加到我的 launch.json 中:
{
"name": "Run and debug",
"program": "${workspaceFolder}/server/index.ts",
"request": "launch",
"skipFiles": [
"<node_internals>/**" …Run Code Online (Sandbox Code Playgroud) c# ×4
debugging ×2
asp.net-core ×1
python ×1
reference ×1
source-maps ×1
typescript ×1
xamarin ×1