This web site uses cookies. By using the site you accept the cookie policy.This message is for compliance with the UK ICO law.

Visual Studio
VS 2003+

Launching Visual Studio in Safe Mode

When installing plug-ins or extensions for Visual Studio, it is possible that a misbehaving add-in can cause Visual Studio to crash or to fail to load. In order to remove the offending add-in, Visual Studio can be started in "Safe Mode".

Safe Mode

Visual Studio provides an extensible integrated development environment (IDE), which is enhanced greatly by the large number of available add-ins and extensions. In most cases these improve the efficiency of developers by providing additional tools, which may be general-purpose extensions or designed to solve a particular problem.

One of the problems with add-ins is that it is possible for a badly written extension, or one that is targeted at a different version of the IDE, to misbehave. In some cases they may cause Visual Studio to stop responding or to crash, either intermittently or predictably. Occasionally they may prevent the IDE from being launched. In these situations you can start Visual Studio in Safe Mode.

Safe mode prevents all third-party add-ins and extensions from loading with Visual Studio, leaving only a default environment and a limited set of services. You should not use safe mode when developing software but only when you cannot access the tools required to disable an add-in. Once the offending extension has been disabled you can restart Visual Studio normally, hopefully rectifying the problem.

Launching in Safe Mode

To start the IDE in safe mode you need to add a switch to the command line. You can do this by editing the properties of your Visual Studio shortcuts. However, as safe mode is designed to be a temporary measure, it is better to start the environment from the command line. To do so, open a new command window and change directory to the folder where devenv.exe resides. You can then start in safe mode by executing the following command:

devenv /SafeMode
2 December 2010