Share via


Debugging 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.

With the Visual Studio debugger, you can debug programs running in multiple processes. A process is an instance of a program running in its own memory space with its own object code, data, and resources. When you start a program by launching an EXE, for example, the system scheduler creates a new process for that program. If you launch multiple instances of the program, it creates multiple processes. The operating system creates other processes, system processes, automatically, for its own purposes.

Here are some considerations and instructions for debugging multiple processes.

Script Applications

Some programs, such as script applications, do not have their own processes. These programs are hosted by another application, such as Internet Explorer or Internet Information Services, and run in the host's process. To debug such a program, you must debug the host process. Usually, this involves attaching to the host process. For more information, see Debugging Script and Web Applications.

Techniques for Debugging Multiple Processes

With the Visual Studio debugger, you can debug multiple processes within a Visual Studio solution. In this case, each process is created by a separate project within the solution, so you can think of this as debugging multiple projects. You can do this by setting multiple startup projects, or you can start debugging one project and then start additional projects from Solution Explorer. For more information on multiple projects, see Choosing the Startup Project.

To switch from debugging one process to debugging another one, use the Debug Location toolbar. For more information, see How to: Debug Multiple Processes.

Visual Studio also gives you the power to debug processes that are started outside of Visual Studio. To do this, you must start Visual Studio and attach to a running process. You can simultaneously debug processes started inside and outside of Visual Studio. For more information, see Attaching to a Running Program or Multiple Programs.

See Also

Tasks

How to: Debug Multiple Processes

How to: Start Execution

How to: Start Execution of a Selected Project

Concepts

Execution Control