Export (0) Print
Expand All

Why Don't My DLL Breakpoints Work?

This topic lists reasons why breakpoints may not work as expected in DLLs and solutions or workarounds for each case.

  • You can't set a breakpoint in a source file when the debugger hasn't loaded the debug information for the module where the code is located.

    Symptoms may include messages, such as the breakpoint cannot be set. The Warning breakpoint glyph appears at the breakpoint location. These Warning breakpoints become actual breakpoints when the code is loaded. For more information, see Breakpoints.

    This may occur in cases such as:

    • Attempting to set a breakpoint in a DLL before LoadLibrary is called.
    • Setting a breakpoint in an ActiveX server before the container has started the server.
  • The debugger may miss breakpoints in a DLL if you have more than one copy of a DLL on your hard disk.

    Multiples copies of a DLL can cause debugger confusion, especially if they are located in your Windows directory. The debugger may load one copy of the DLL while Windows loads a different copy. You cannot force the debugger to load a specific DLL, so you should keep only one version of a DLL at a time in your path, current directory, and Windows directory.

See Also

Debugging DLLs

Show:
© 2014 Microsoft