How to Run Instrumentation Profiling with a DLL in Visual Studio 2019 and 2022
In Visual Studio 2017, the Performance Profiler (Instrumentation mode) lets you select both a DLL and an EXE file. However, in Visual Studio 2019 and 2022, I am unable to select a DLL using the Debug ? Performance Profiler ? Instrumentation option.
What I’ve Tried:
I modified my Visual Studio 2022 installation to include the Windows Performance Toolkit component. After this, the option to add an item in the Instrumentation menu appeared. I was then able to select the DLL along with the EXE, and the profiler ran and closed properly. The summary window was displayed.
Issue:
Although the profiler completed successfully, the summary showed no data(Hot path call tree, Function view etc). I ensured that the PDB file for the DLL was present in the same directory, as selecting a DLL without its PDB file results in an error.
Question:
How can I correctly run Instrumentation profiling with a DLL in Visual Studio 2019 or 2022 and ensure that performance data is properly captured and displayed similar to Visual Studio 2017?