0X00000227

Fix 0X00000227: Profiling Not Stopped Error on Windows

Windows Errors Intermediate 👁 3 views 📅 Jun 2, 2026

This error means a profiler (like Visual Studio's performance tools) didn't shut down properly. I'll show you how to kill stuck processes and clean up to get things running again.

1. Stuck Profiler Process (Most Common Cause)

The usual culprit is a profiler process—like vsperfcmd.exe (Visual Studio) or wpr.exe (Windows Performance Recorder)—that didn't get killed when you pressed stop. I've seen this happen when you close Visual Studio mid-session, or when a profiler crashes itself. The OS still thinks profiling is running and blocks any new start.

The Fix

  1. Open Task Manager (Ctrl+Shift+Esc) and look for these processes under the Details tab:
    • vsperfcmd.exe
    • wpr.exe
    • profile.exe (older frameworks)
    • VsPerfMon.exe
  2. Right-click each and select End task. If they won't die, use taskkill /F /IM vsperfcmd.exe from an admin Command Prompt.
  3. Reboot. That's the nuclear option, but it always works if some kernel-level profiling driver got stuck.

I had a client last month whose entire print queue died because of this—well, not the queue, but their profiling session locked up and prevented any debug sessions from starting. A reboot fixed it in 30 seconds.

2. Corrupt Profiling State in Registry

If killing the process didn't work, the profiling state might be stored in the registry and needs a manual reset. This happens when a profiler doesn't clean up after itself—common with older Visual Studio versions or the Windows Performance Toolkit (WPT).

The Fix

  1. Press Win+R, type regedit, and hit Enter.
  2. Navigate to:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
  3. Look for keys named after your profiler—like vsperfcmd.exe or devenv.exe. If you see a subkey named PerfOptions or ProfilingMode, delete it.
  4. Also check:
    HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\[version]\Profiler
    Delete anything there that looks like a stuck session (e.g., ActiveSession).
  5. Reboot.

One developer I helped had this exact problem after running Visual Studio 2019's CPU profiler on a Windows 10 machine. Deleting the PerfOptions key got him back to work in five minutes.

3. Conflicting Anti-Virus or Security Software

Some security software (like Bitdefender or McAfee) hooks into process creation and can interfere with the profiler's startup/shutdown sequence. The profiler tries to stop, but the anti-virus holds a reference to the process and doesn't release it, causing the error.

The Fix

  1. Temporarily disable your anti-virus real-time protection.
  2. Try starting/stopping the profiler again.
  3. If it works, add the profiler's executable (e.g., vsperfcmd.exe, wpr.exe) to your anti-virus exclusion list. Also exclude the profiling data folder (usually %TEMP%\*profiler* or %LOCALAPPDATA%\Temp\Profiler).
  4. Re-enable your anti-virus.

I had a client running Windows Server 2022 with Trend Micro that couldn't use any profiling tools at all. Once we added exclusions, everything worked fine. The lesson: anti-virus vendors often don't test against developer tools.

Quick-Reference Summary Table

Cause What to Do Time
Stuck profiler process Kill vsperfcmd.exe / wpr.exe in Task Manager, then reboot 2 min
Corrupt registry state Delete PerfOptions key in regedit 5 min
Anti-virus blocking Disable AV, add exclusions for profiler exes 10 min

If none of these work, you might have a corrupted installation of the profiling tools themselves. Try repairing Visual Studio or reinstalling the Windows Performance Toolkit from the Windows SDK. But honestly, 90% of the time it's a stuck process or a registry leftover. Start there.

Was this solution helpful?