Latest WinDbg


Ive downloaded the latest WinDbg (5.1.2250.3) from the microsoft site, and
am having problems setting breakpoints when using kernel mode debugging
under Win2000 against a Win2000 checked build. I have set the source path

If I set a breakpoint in a source before starting the debugging I get the
message ‘Debugee must be stopped before breakpoints can be modified’, this
same message is received if I try to set a breakpoint once the debugging
session has begun (File->Kernel Debug). If I break the session and set a
breakpoint I get another message ‘Code not found, breakpoint not set’.

Apart from that the session run ok, and I can see all the Debug output from
the various drivers running.

Can anyone help?



The new WinDBG is not “asynchronous”.
The target machine (for kernel mode) or application (for user mode
debugging) must be broken into before you can run commands or set
breakpoints. There are a few exceptions to this, like setting verbose mode
for example.

With respect to the “code not found”, did you just open a source file
manually and tried to set a breakpoint in it ? If yes, you can’t
necessarily do that because the debugger does not know which image the
source is associated with. Make sure the .pdb of the driver or component
is loaded before you set the source breakpoint in this way.

If you want a breakpoint for a module that is not loaded yet, use the
command line:

bp image!function

if the module is not loaded yet, the debugger will treat it as a delayed
breakpoint and try to resolve it each time a new image is loaded by the

Hope this helps.