Поделиться через


How to: Debug Native DLLs

This topic applies to:

Edition

Visual Basic

C#

F#

C++

Web Developer

Express

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

Native only

Topic does not apply

Pro, Premium, and Ultimate

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

Native only

Topic does not apply

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, choose Import and Export Settings on the Tools menu. For more information, see Working with Settings.

When you debug a DLL, you can start debugging from:

  • The project used to create the executable that calls the DLL.

- or -

  • The project used to create the DLL itself.

If you have the project used to create the executable, start debugging from that project. You can then open a source file for the DLL and set breakpoints in that file, even though it is not a part of the project used to create the executable. For more information, see Breakpoints.

If you start debugging from the project that creates the DLL, you must specify the executable you want to use in debugging the DLL.

To specify an executable for the debug session

  1. In Solution Explorer, select the project that creates the DLL.

  2. From the View menu, chooseProperty Pages.

  3. In the Property Pages dialog box, open the Configuration Properties folder and select the Debugging category.

  4. In the Command box, specify the path name for the container. For example, C:\Program Files\MyApplication\MYAPP.EXE.

  5. In the Command Arguments box, specify any necessary arguments for the executable.

If you do not specify the executable in the Project Property Pages dialog box, the Executable for Debugging Session Dialog Box appears when you start debugging.

See Also

Concepts

Debugger Security

Other Resources

Debugging in Visual Studio