包阅导读总结
1.
关键词:Visual Studio 2022、调试、诊断、新功能、性能提升
2.
总结:
本文介绍了 Visual Studio 2022 v17.11 中的新调试和诊断功能,包括异步方法异常中断、AI 生成断点表达式等,还提到了在 profiling 方面的改进,如保持目标选择和反编译.NET 程序集,最后期待用户反馈。
3.
主要内容:
– 新调试和诊断功能
– 异步方法异常中断:在异步任务方法向框架代码抛出异常时自动中断
– AI 生成断点表达式:在 C++ 中支持,由 GitHub Copilot 分析代码提供
– 调试 AnyCPU 应用:支持在 Arm64 上原生运行
– Blazor WebAssembly 调试:针对.NET 9 及以上改进调试体验
– 断点分组:可自定义和切换,能设置默认组
– 编辑和可视化 LINQ 表达式:在 IEnumerable 可视化工具中
– 提升 C++ 条件断点性能
– 新 profiling 功能
– 保持目标选择:在多次运行间保留
– 反编译.NET 程序集:在无源代码时自动反编译
– 反馈:希望用户通过多种渠道分享反馈
思维导图:
文章地址:https://devblogs.microsoft.com/visualstudio/new-debugging-and-diagnostic-features/
文章来源:devblogs.microsoft.com
作者:Harshada Hole
发布时间:2024/8/20 10:00
语言:英文
总字数:623字
预计阅读时间:3分钟
评分:86分
标签:调试,Visual Studio 2022,诊断,AI 在开发中,Arm64 支持
以下为原文内容
本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com
Debugging and diagnostics are vital skills for any developer, but they can also be difficult and time-consuming to get proficient. That’s why we’ve added some fantastic new features and enhancements to Visual Studio 2022 v17.11 that will help you find and resolve bugs faster and easier than ever before. Here are some of the highlights. Download this update and see the release notes for all the details.
VIDEO
Debugging
Break on async method exceptions
Debugging asynchronous code, especially in frameworks like ASP.NET, can be tricky due to the potential for exceptions to be thrown across asynchronous boundaries.
Now, with Visual Studio Debugger it automatically breaks when an async Task method throws an exception back to framework code.
AI-generated breakpoint expressions
AI-generated expressions for conditional breakpoints and tracepoints are now supported in C++. GitHub Copilot analyzes your code and offers insightful breakpoint expressions, streamlining your debugging process.
Debug AnyCPU applications manifested to run as arm64
Visual Studio natively supports building and debugging Arm64 apps on Arm-based processors. Unfortunately, applications built with the AnyCPU setting running on an Arm64 machine will default to using x64 emulation. While the capabilities of the x64 emulator have expanded, the most efficient Arm CPU scenarios are supported when applications are running natively.
To better support the intended native behavior the Windows 24H2 update introduces a new <supportedArchitectures> setting for your App manifest files. .NET developers can include a list of supported architectures (amd64 or arm64), explicitly signaling that an application built with the AnyCPU setting should run natively using the Arm64 CLR on Arm64 devices.
Blazor WebAssembly debugging
This release features a preview of the improved debugging experience for Blazor WebAssembly apps targeting .NET 9 or later.
Organize your breakpoints with default breakpoint groups
Breakpoint groups allow you to customize and toggle breakpoints for faster and more effective debugging.
You can now mark the selected breakpoint group as the default, ensuring all newly added breakpoints are automatically included in that group.
Edit and visualize LINQ expressions in the IEnumerable visualizer
The Visual Studio debugger now offers an editable expression feature in the IEnumerable visualizer, a powerful enhancement for developers working with collections.
Improved performance of conditional breakpoints in C++
We have significantly enhanced the performance of conditional breakpoints in C++ through a reworked implementation.
Our initial assessment shows a performance improvement of at least 35% in version 17.10 and 70% in version 17.11, reducing execution time from 80 seconds to 21 seconds over 80,000 iterations.
Profiling
Keep your target selection in the instrumentation tool between runs
The instrumentation tool now persists the target selection between runs offering a significant benefit by enhancing the continuity of profiling sessions.
With this improvement, you can maintain your specified target across multiple instrumentation runs, removing the need for repetitive selection tasks.
Decompile .NET assemblies
Visual Studio profiler now offers auto-decompilation for .NET libraries in scenarios where source code is unavailable. By automatically decompiling code during source lookup, even without loaded symbols or exact file locations, you can gain insights into the code’s structure and performance issues.
With this new feature, while visualizing a collection or dataset, you can directly edit the expressions textbox on the top of the dialog with your desired LINQ expressions. The visualizer updates in real-time, reflecting the data change resulting from your query.
We hope you enjoy this update to Visual Studio, and we look forward to hearing what you think. You can share feedback with us viaDeveloper Community, by reporting issues viareport a problemandshare your suggestionsfor new features or improvements to existing ones.
Stay connected with the Visual Studio team by following us on Twitter @VS_Debugger, Twitter @VisualStudio, YouTube, and LinkedIn and onMicrosoft Learn.
Thank you for using Visual Studio and happy coding!