网页 综合 更新时间 2026-11-12 16:49:13

C++ Dynamic Debugging is now generally available - C++ Team Blog

自动蜘蛛 devblogs.microsoft.com 正文约 3462 字
C++ Dynamic Debugging is now generally available - C++ Team Blog
We are excited to announce that C++ Dynamic Debugging is now generally available in all Visual Studio 2026 channels and the Microsoft C++ (MSVC) Build Tools version 14.52.
In the traditional workflow for games or large applications, switching to a debug build gives you access to debug symbols at the expense of performance. In contrast, when you debug optimized or release builds, you’ll often encounter variables that are “optimized away” and find it difficult to step reliably through the code you want to inspect.
With C++ Dynamic Debugging, you get the best of both worlds. You can inspect local variables, step through your source line by line, and step into inlined functions. The rest of your application stays optimized, so you can keep the runtime performance you need to reach and investigate a problem.
After turning on the feature and rebuilding your application, Dynamic Debugging will deoptimize functions for you when setting a breakpoint or stepping into a function. You don’t need to stop, add #pragma optimize, rebuild, and reproduce the issue again just to inspect that code. For large games and performance-sensitive applications, that means less time preparing to debug and more time investigating the issue.
After (With C++ Dynamic Debugging)
From game development to virtual reality, Microsoft teams have already been using C++ Dynamic Debugging to make optimized code easier to debug. Here’s what they’re saying:
“Dynamic Debugging is a game changer for C++ development. It lets me work in the optimized builds I actually need for large game codebases, while still being able to deoptimize and inspect code and runtime state when it matters. It removes a longstanding tradeoff between realistic runtime performance and a productive debugging experience.”
Michael Buschbeck – Principal Software Engineer, Microsoft Havok
“Performance is critical when developing virtual reality applications, so my team builds with optimizations on. Dynamic Debugging lets us debug that optimized code as if it were unoptimized. It’s so seamless you forget how much it’s helping.”
Bryce Hutchings – Principal Software Engineer, Microsoft Cloud Streaming, Mixed Reality, and Graphics
For an x64 MSBuild C++ project, select your Release configuration then open project properties. Set Configuration Properties > Advanced > Use C++ Dynamic Debugging > Yes. Then, rebuild your project to get started. This setting turns off Whole Program Optimization. For CMake and other build systems, you can pass the new /dynamicdeopt switch to cl.exe, lib.exe, and link.exe.
C++ Dynamic Debugging also works with Unreal Engine 5.6 and later, with support in Unreal Build Tool and Unreal Build Accelerator. To try it, enable WindowsPlatform.bDynamicDebugging = true; in your target’s .Target.cs file and rebuild.
In addition, Dynamic Debugging is compatible with distributed build systems like FastBuild and IncrediBuild.
See the documentation for other build systems, requirements, and limitations.
We would love to hear how C++ Dynamic Debugging works for your projects. Share your thoughts by commenting below, through Help > Send Feedback in Visual Studio, on X (@VisualC), or by email at visualcpp@microsoft.com.
I am a video game developer focused PM on the Visual C++ Team. Talk to me about video games!
Join the discussion.
This is a good feature. I tried it, and I’m certain it will improve my daily workflow.
Enter the destination URL
Or link to existing content
访问原文 返回搜索 https://devblogs.microsoft.com/cppblog/c-dynamic-debugging-is-now-generally-available/
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。