How to: Debug Multiple Processes

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not apply Topic does not apply Topic does not apply Topic does not apply

Standard

Topic applies Topic applies

Topic applies

Topic does not apply

Pro and Team

Topic applies Topic applies

Topic applies

Topic does not apply

Table legend:

Topic applies

Applies

Topic does not apply

Does not apply

Topic applies but command hidden by default

Command or commands hidden by default.

You can debug multiple processes even if the processes are running code written in different languages. For example, you can concurrently debug one process that contains code written in C++ and a second process that contains code written in Visual Basic. Mixed language debugging is generally transparent, as long as the languages are supported by the Visual Studio debugger.

Starting Additional Projects

To start one project when another is already running, both projects must be in the same solution. You can use Solution Explorer to start the additional project or projects:

Note

The dialog boxes and menu commands you see might differ from those described in Help depending on your active settings or edition. To change your settings, select Import and Export Settings on the Tools menu. For more information, see Visual Studio Settings.

To start a project in Solution Explorer

  1. In Solution Explorer, select the project you want to start debugging.

  2. Right-click the project name or icon.

  3. On the shortcut menu, select Debug and then click Start new instance or Step Into new instance.

Switching Between Running Projects

When you are debugging two or more projects in a solution, you can switch between them in either of two ways:

To switch between projects while you are debugging

  1. If the Debug Location toolbar is not visible:

    1. On the Tools menu, select Customize.

    2. In the Customize property sheet, select the Toolbars tab and select Debug Location.

    3. Click OK.

  2. On the Debug Location toolbar, use the Program list to select the program that you want to switch to.

Switching to a project makes it the current process for debugging purposes. Any debugger window that you view will show the state for the current process.

By default, breaking the current process breaks all processes you are debugging. You can change this default behavior so that only the current process breaks and other processes continue to run.

To Change Process Break Behavior

To stop the current process only

  1. On the Tools menu, select Options.

  2. In the Options dialog box, open the Debugging folder and select the General category.

  3. Toggle Break all processes when one process breaks.

  4. Click OK.

See Also

Tasks

How to: Start Execution

How to: Start Execution of a Selected Project

Concepts

Debugging Multiple Processes

Execution Control