How Can I Keep Focus When Stepping Through My Program?

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not apply Topic does not apply

Native only

Topic does not apply

Standard

Topic does not apply Topic does not apply

Native only

Topic does not apply

Pro and Team

Topic does not apply Topic does not apply

Native only

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.

Problem Description

My program has a window-activation problem. Stepping through the program with the debugger interferes with my ability to reproduce the problem because my program keeps losing focus. Is there any way to avoid this?

Solution

If you have a second computer, use remote debugging. You can operate your program on the remote computer while you run the debugger on the host. For more information, see How to: Select a Remote Computer.

See Also

Concepts

Debugging Native Code FAQs

Other Resources

Attaching to Running Processes

Debugging Native Code