/DYNAMICDEOPT
(Support C++ Dynamic Debugging) (Preview)
Important
The /DYNAMICDEOPT
linker switch is currently in PREVIEW.
This information relates to a prerelease feature that might be substantially modified before release. Microsoft makes no warranties, expressed or implied, with respect to the information provided here.
The /DYNAMICDEOPT
linker option, when used with the compiler switch /dynamicdeopt
, enables C++ Dynamic Debugging (Preview), which allows you to debug optimized code as if it were compiled deoptimized and step in anywhere with on-demand function deoptimization.
Syntax
/DYNAMICDEOPT
/DYNAMICDEOPT:SUFFIX=<suffix>
/DYNAMICDEOPT:SYNC
Arguments
suffix
Specify the file extension for the deoptimized output.
With no options and given test.cpp
as input, the compiler output includes test.obj
, test.exe
, and test.pdb
, as well as test.alt.obj
, test.alt.exe
, and test.alt.pdb
. This switch allows you to change the suffix for the unoptimized binary build artifacts from .alt
to something else. If you change the suffix, all files must use the new suffix, and it needs to match the name passed to the compiler using /dynamicdeopt:suffix
(Preview). You typically don't use this switch unless you need to avoid filename collisions with other files that you have.
SYNC
Builds the deoptimized output after building the optimized output instead of in parallel. By default, the compiler spawns a parallel linker to link the unoptimized binary. This switch makes the second link run serially after the first one. This switch is provided in case this better suits your build environment.
Remarks
This preview flag, available starting with Visual Studio 2022 Version 17.14 Preview 2, applies only to x64 projects.
Set this linker option in the Visual Studio development environment
- Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.
- Select the Linker > Debugging property page.
Set this linker option programmatically
See also
/dynamicdeopt
(Enable C++ Dynamic Debugging) (Preview)
C++ Dynamic Debugging (Preview)
MSVC linker reference
MSVC linker options