Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
How Can I Debug Access Violations When Running My Program Outside the Debugger?

How Can I Debug Access Violations When Running My Program Outside the Debugger?

This topic applies to:

Edition

Visual Basic

C#

C++

Web Developer

Express

Topic does not applyTopic does not apply

Native only

Topic does not apply

Standard

Topic does not applyTopic does not apply

Native only

Topic does not apply

Pro and Team

Topic does not applyTopic 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.

My program runs fine in the Visual Studio environment, but when I run it stand alone with the Windows operating system, it produces an access violation. How can I debug this problem?

Set the Just-in-time debugging option and run your program standalone until the access violation occurs. Then, in the Access Violation dialog box, you can click Cancel to start the debugger.

Also see the Knowledge Base article Q133174, "How to Locate Where a General Protection (GP) Fault Occurs." You can find Knowledge Base articles on the MSDN Library CD or at http://search.support.microsoft.com.

Community Additions

ADD
Show:
© 2015 Microsoft