visual-studiovisual-studio-2022

VS2022 cannot start diagnostic session


Launching a CPU Usage performance profiler session in VS 2022 hangs indefinitely on:

"Starting diagnostics session"

After cancelling there is this error message in the Diagnostic hub output window:

'[ProjectName]' failed to launch
'Invalid operation detected by 'StandardClientTransportConnection.SendCustomMessageAsync'.'

The project compiles and runs fine. I have tried resetting my all Environment Options to a default set (I tried both Web Development and Web Development(Code only)). I've updated and repaired the installation of Visual Studio.


Solution

  • Check that the "Start action" of the project isn't set to:
    "Don't open a page. Wait for a request from an external application".

    enter image description here