Open MikeH2023 opened 1 year ago
Hi @MikeH2023! Can you please provide the logs from: %USERPROFILE%\AppData\Local\.MicroProfiler
? It looks like something failed at the initialization of the plugin. I noticed, that VS sometimes defers initialization for quite a while, this doesn't look like your case, though...
P.S. Ulikely, but an experimental version might work: https://github.com/tyoma/micro-profiler/releases/download/v2.0.653.0/micro-profiler_x64.v2.0.653.0.vsix
@tyoma Thank you and apologies for the delay, I'm a bit sick right now :( I will try the experimental version and post the logs
I have the same problem, with Microsoft Visual Studio Professional 2022 (64-bit) - LTSC 17.4 Version 17.4.10. After installing the extension, "Enable Profiling" and "Remove Profiling Support" are both shown in the project context menus. Selecting "Enable Profiling" does not change the appearance of the two entries, and does not force a rebuild of my project. Selecting "Build" manually says everything is still up to date. I managed to rebuild my application after manually configuring profiling but still no profiling window showed up when I ran the application. I tried attaching the logs that you asked MikeH2023 for (but from my system, of course), but keep getting the message "Something went really wrong, and we can't process that file. Try again.", even if I zip the logs and try to attach the zip file.
Here are the contents of micro-profiler_vspackage.log:
20230825T085307.331Z I ---------- Application logging started. 20230825T085307.331Z I VSPackage Module: loaded... getpid(): 78016 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T085307.332Z I VS Package: constructed... this: 0x0000019B04FCA290 20230825T085307.333Z I Generic VS Package: initializing (async)... sp: 0x0000019B01C1ED30 20230825T085307.334Z I Generic VS Package: VsUIShell obtained... p: 0x0000019B72425BA0 20230825T085307.334Z I Generic VS Package: FontsAndColors obtained... p: 0x0000019B0AB12670 20230825T085307.334Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T085307.669Z I Generic VS Package: VsShell obtained... p: 0x0000019B7233C050 20230825T090828.291Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T090828.291Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T090828.291Z I Generic VS Package: ... Releasing VS objects. 20230825T090828.291Z I Generic VS Package: ... Everything released! 20230825T090846.068Z I ---------- Application logging started. 20230825T090846.068Z I VSPackage Module: loaded... getpid(): 91464 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T090846.068Z I VS Package: constructed... this: 0x0000011284F3A290 20230825T090846.068Z I Generic VS Package: initializing (async)... sp: 0x00000112CF91ED30 20230825T090846.080Z I Generic VS Package: VsUIShell obtained... p: 0x00000112CF09F9D0 20230825T090846.080Z I Generic VS Package: FontsAndColors obtained... p: 0x000001128CB3AD50 20230825T090846.080Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T090846.121Z I Generic VS Package: VsShell obtained... p: 0x00000112CEF93550 20230825T090936.040Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T090936.040Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T090936.040Z I Generic VS Package: ... Releasing VS objects. 20230825T090936.040Z I Generic VS Package: ... Everything released! 20230825T091018.914Z I ---------- Application logging started. 20230825T091018.914Z I VSPackage Module: loaded... getpid(): 56912 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T091018.914Z I VS Package: constructed... this: 0x0000024084EEA290 20230825T091018.915Z I Generic VS Package: initializing (async)... sp: 0x00000240BA1FED30 20230825T091018.915Z I Generic VS Package: VsUIShell obtained... p: 0x00000240B835F750 20230825T091018.916Z I Generic VS Package: FontsAndColors obtained... p: 0x000002408D9CC470 20230825T091018.916Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T091018.967Z I Generic VS Package: VsShell obtained... p: 0x00000240B82F2C40 20230825T091054.021Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T091054.021Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T091054.021Z I Generic VS Package: ... Releasing VS objects. 20230825T091054.021Z I Generic VS Package: ... Everything released! 20230825T091150.581Z I ---------- Application logging started. 20230825T091150.581Z I VSPackage Module: loaded... getpid(): 85336 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T091150.581Z I VS Package: constructed... this: 0x0000018A86B5A290 20230825T091150.581Z I Generic VS Package: initializing (async)... sp: 0x0000018AECE3ED30 20230825T091150.597Z I Generic VS Package: VsUIShell obtained... p: 0x0000018AEC601760 20230825T091150.597Z I Generic VS Package: FontsAndColors obtained... p: 0x0000018A8664F740 20230825T091150.597Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T091150.660Z I Generic VS Package: VsShell obtained... p: 0x0000018AEC3186A0 20230825T091252.318Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T091252.318Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T091252.318Z I Generic VS Package: ... Releasing VS objects. 20230825T091252.318Z I Generic VS Package: ... Everything released! 20230825T091523.763Z I ---------- Application logging started. 20230825T091523.763Z I VSPackage Module: loaded... getpid(): 11808 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T091523.764Z I VS Package: constructed... this: 0x000002151418A270 20230825T091523.765Z I Generic VS Package: initializing (async)... sp: 0x00000215608DED30 20230825T091523.767Z I Generic VS Package: VsUIShell obtained... p: 0x0000021560092260 20230825T091523.767Z I Generic VS Package: FontsAndColors obtained... p: 0x0000021530E97D40 20230825T091523.767Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T091523.842Z I Generic VS Package: VsShell obtained... p: 0x000002155FF867C0
Here are the contents of micro-profiler_vspackage-2.log:
20230825T085854.346Z I ---------- Application logging started. 20230825T085854.346Z I VSPackage Module: loaded... getpid(): 92412 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T085854.346Z I VS Package: constructed... this: 0x000001D6B3A9A450 20230825T085854.346Z I Generic VS Package: initializing (async)... sp: 0x000001D60E8FED30 20230825T085854.349Z I Generic VS Package: VsUIShell obtained... p: 0x000001D60E075ED0 20230825T085854.349Z I Generic VS Package: FontsAndColors obtained... p: 0x000001D6B9CBD880 20230825T085854.349Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T085854.391Z I Generic VS Package: VsShell obtained... p: 0x000001D60DF69490 20230825T090558.013Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T090558.013Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T090558.013Z I Generic VS Package: ... Releasing VS objects. 20230825T090558.013Z I Generic VS Package: ... Everything released! 20230825T090611.102Z I ---------- Application logging started. 20230825T090611.103Z I VSPackage Module: loaded... getpid(): 4268 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T090611.103Z I VS Package: constructed... this: 0x0000019FD80DA450 20230825T090611.103Z I Generic VS Package: initializing (async)... sp: 0x0000019F2877ED30 20230825T090611.104Z I Generic VS Package: VsUIShell obtained... p: 0x0000019F27E91670 20230825T090611.104Z I Generic VS Package: FontsAndColors obtained... p: 0x0000019FD443C540 20230825T090611.104Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T090611.161Z I Generic VS Package: VsShell obtained... p: 0x0000019F27C5C3B0 20230825T090618.456Z I Generic VS Package: shutting down package. Entering derived class termination... 20230825T090618.457Z I Generic VS Package: ... Releasing wpl supporting objects... 20230825T090618.457Z I Generic VS Package: ... Releasing VS objects. 20230825T090618.457Z I Generic VS Package: ... Everything released! 20230825T092029.217Z I ---------- Application logging started. 20230825T092029.218Z I VSPackage Module: loaded... getpid(): 22368 self: c:\users\louis\appdata\local\microsoft\visualstudio\17.0_bf51dd3b\extensions\ktox13wa.d2d\micro-profiler_frontend.dll exe: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe vs.major: 17 vs.minor: 4 vs.build: 33927 vs.patch: 135 20230825T092029.218Z I VS Package: constructed... this: 0x00000184B081A480 20230825T092029.220Z I Generic VS Package: initializing (async)... sp: 0x0000018401C0ED30 20230825T092029.244Z I Generic VS Package: VsUIShell obtained... p: 0x00000184083D56F0 20230825T092029.244Z I Generic VS Package: FontsAndColors obtained... p: 0x00000184C24F32F0 20230825T092029.244Z I Generic VS Package: initializing wpl support (backbuffer, renderer, text_engine, etc.)... 20230825T092029.330Z I Generic VS Package: VsShell obtained... p: 0x00000184083D9890
Here are the contents of micro-profiler.
20230825T095324.481Z I ---------- Application logging started.
20230825T095324.637Z I Profiler Instance: overhead calibrated...
inner_ns: 10
total_ns: 21
20230825T095324.637Z I Active server: constructed...
this: 0x000001CA33E5EE58
20230825T095324.637Z I Profiler Instance: initialized...
get_current_executable():
This was the first time that I tried to use the MicroProfiler with Visual Studio 2022. I've used it without problems with older versions of Visual Studio and was very happy with it. I hope you can figure out what's going wrong.
I'm having significant issues getting the micro-profiler to work with on C++ projects with Visual Studio 2022.
I'm using VisualStudio 2022 (64bit, v17.4.2) and I attempted both downloading the plugin via the VisualStudio Markedplace and as .vsix and .msi releases from here (v2.0.650.0 and v2.0.653.0). The only other plugins would be the Qt-Addin (for Qt), Visual AssistX, and GitExtensions.
After installing the microprofiler get the relevant entries under extensions and the right-click context menu of my projects ("enable profiling" and - oddly enough - "remove profiling support" despite me not having added profiling support to the project yet). However clicking on either entry does not result in anything happening - "enable profiling" does not get check-marked, "remove profiling support" does not do anything.
Manually adding the profiling support (via the /GH /Gh switches and including the microprofiler library, as shown in the guide) does not change the state of either context menu. Rebuilding and launching the application will however not open the profiling window (nor will launching the application outside VisualStudio). I've tried removing the frontend.dll, which WILL cause an error to be thrown due to a missing dll, and not including the library file will result in compile errors so I assume the instrumentation is being included correctly, but I am at a loss as to why it does not work.