Kongsi melalui


Debug 64-Bit Applications

Applies to: yesVisual Studio noVisual Studio for Mac

Note

This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

You can debug a 64-bit application that is running on the local computer or on a remote computer.

To debug a 64-bit application that is running on a remote computer, see Remote Debugging.

To debug 64-bit applications locally, Visual Studio uses a 64-bit worker process (msvsmon.exe) to perform the low-level operations that cannot be done inside of the 32-bit Visual Studio process.

Mixed-mode debugging is not supported for 64-bit processes that use .NET Framework version 3.5 or earlier.

Debug a 64-bit Application

To try debugging a 64-bit application:

  1. Create a Visual Studio solution, for example a C# console application.

  2. Set the configuration to 64-bit using the Configuration Manager. For more information, see How to: Configure Projects to Target Platforms.

  3. At this point the 64-bit version of the remote debugger (msvsmon.exe) starts. It runs as long as the solution with the 64-bit configuration is open.

  4. Start debugging. You should have the same experience as with a 32-bit configuration. If you get errors, see the Troubleshooting section below.

Troubleshooting 64-bit debugging

You may see an error: "A 64-bit debugging operation is taking longer than expected." or "A debugger operation is taking longer than expected." In this case, Visual Studio has sent a request to msvsmon.exe, and it has taken a long time for the result of that request to come back.

There are two main causes for this error:

  • You have networking security software installed on your computer that has caused the networking stack to be unreliable, and it has dropped packets going over localhost. Try disabling all network security software and see if this resolves it. If so, report to your network security software vendor that the software is interfering with localhost traffic. This should not occur with Visual Studio 2019 and later, because those versions don't use sockets for this communication.

  • You are running into an issue where Visual Studio becomes unresponsive, or other performance problem. If the problem happens regularly, you can collect dumps of Visual Studio (devenv.exe) and the worker process (msvsmon.exe) and send them to Microsoft. For information about reporting a problem, see How to Report a Problem with Visual Studio.

See also