Search code examples
visual-studioprofilerconditional-breakpoint

Visual Studio 2015 when a "When Hit" breakpoint hit, run profiler


How do you get the Visual Studio 2015 profiler to run when a breakpoint is hit? I only need to profile one small section of code. The link below suggests that this can be done with the "when hit" breakpoints but does not give any details as to what the condition should be.

Visual Studio Profiler Suggestion


Solution

  • The link you provided is a suggestion for the new feature. Currently it is not possible to start/ stop profiler based on breakpoint hit. You can however manually enable/ disable CPU Sampling in CPU Usage tab at any time while debugging.