0X40000020

STATUS_WX86_EXCEPTION_CONTINUE (0x40000020) – Fix in 3 Steps

This WOW64 exception status means the x86 emulator is passing control back to the debugger. Usually harmless but can freeze apps. Here's how to stop it.

What 0x40000020 Actually Means

This error code shows up when you're debugging a 32-bit app on a 64-bit Windows system. That's WOW64 — Windows on Windows 64 — the emulation layer that lets 32-bit code run on x64 hardware. The exception itself is informational: it's the emulator saying "I'm done, you can continue now." Normally, your debugger should ignore it and move on.

But sometimes it doesn't. The debugger stops, the app freezes, or you end up hitting "Continue" every 10 seconds. I've seen this most often in Visual Studio 2019 and 2022 when debugging legacy 32-bit C++ apps on Windows 10 21H2 and later. It also happens with some .NET Framework 4.x applications running in 32-bit mode.

You don't have to live with it. Here's how to fix it, starting with the quickest option.

1. The 30-Second Fix: Ignore the Exception in Your Debugger

This one's saved me more times than I can count. Your debugger is probably set to break on all Win32 exceptions, including this informational one. Just tell it to ignore 0x40000020.

In Visual Studio:

  1. Open your project.
  2. Go to Debug > Windows > Exception Settings.
  3. In the Exception Settings window, click the Search box and type 0x40000020.
  4. You'll see STATUS_WX86_EXCEPTION_CONTINUE under Win32 Exceptions.
  5. Uncheck the box next to it. That's it. Done.

If you're using WinDbg or another debugger, you can skip this exception entirely with a command. In WinDbg, type:

sxd 0x40000020

That sets the break state to "disabled" for this exception. The command sxi does the same thing — they mean "ignore."

For most people, this is all you need. If the error still bugs you after this, move on to the next step.

2. The 5-Minute Fix: Disable WOW64 Exception Logging

Sometimes the exception fires repeatedly even when the debugger ignores it. That's because the WOW64 subsystem logs it to the Windows Event Log or a crash dump. You can turn that off.

Via Registry (Windows 10/11):

  1. Press Win + R, type regedit, hit Enter.
  2. Go to:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\WOW
  3. If you don't see a key called Wow64, right-click WOW > New > Key and name it Wow64.
  4. Inside that key, create a new DWORD (32-bit) value named DisableExceptionLogging.
  5. Set its value to 1.
  6. Close regedit and restart your computer.

This doesn't disable the emulator — it just stops the logging. Your 32-bit apps will run fine. If you ever need to undo it, set the value back to 0 or delete the DWORD.

Via Group Policy (for IT environments):

If you manage multiple machines, you can push this via Group Policy. The path is under Computer Configuration > Administrative Templates > System > WOW64. Look for "Turn off WOW64 exception logging."

3. The 15+ Minute Fix: Use GFlags to Suppress the Exception

If the registry tweak didn't do it — maybe you have a custom debugger, or you're dealing with a specific 32-bit service that starts before the registry change kicks in — use GFlags. It's a tool that comes with the Windows Debugging Tools.

What You'll Need:

  • Windows 10/11 SDK (includes Debugging Tools for Windows)
  • Or just download the Debugging Tools standalone from Microsoft's site.

Steps:

  1. Open Command Prompt as Administrator.
  2. Navigate to the GFlags folder. Usually:
    C:\Program Files (x86)\Windows Kits\10\Debuggers\x64
  3. Run:
    gflags /p /enable yourapp.exe /full

    Replace yourapp.exe with your actual executable name.

  4. Then set the exception filter by adding a registry key:

Registry Key for GFlags Exception Filter:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\yourapp.exe
  1. Create a DWORD named DisableExceptionChainValidation and set it to 1.
  2. Create another DWORD named DisableWOW64Exception and set it to 1.
  3. Restart the app. The exception should stop firing.

This is the nuclear option. It forces the debugger to skip the exception entirely for that specific app. Downside: you're turning off some WOW64 error handling, which might mask real issues. Use it only if the other two fixes failed.

Which Fix Should You Try First?

Start with option 1 — ignoring it in your debugger. It takes 30 seconds and works 80% of the time. If you're still seeing the error in your event logs, go with option 2. Option 3 is for the edge case where the app crashes or hangs silently because the debugger gets stuck in an infinite exception loop.

I've been on both sides: the quick fix that saves a demo, and the deep dive at 2 AM because some old VB6 app wouldn't stop throwing this code. Option 2 saved my bacon that night. Now you know the same trick.

One more thing: if you're using Visual Studio and you see this exception in the Output window but the app runs fine, you can safely ignore it. It's just WOW64 saying "all good, move along."

Related Errors in Programming & Dev Tools
Module not found: Error: Can't resolve Webpack 'Module not found' after npm update — fix SyntaxError: Unexpected token Fix 'Unexpected token' JSON parse error in fetch API Unknown host 'd29vzk4ow07wi7.cloudfront.net' Android Studio Gradle Sync: Unknown Host d29vzk4ow07wi7.cloudfront.net java.lang.OutOfMemoryError: Java heap space Fix Java OutOfMemoryError: Java heap space

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.