D Programming Language 2.0

- Comments
- D
- Search
- Downloads
- Home

Last update Sun Sep 9 15:43:25 2007

# Debugging D on Windows

The Microsoft Windows debugger can be used to symbolically debug D programs, even though it is a C++ debugger. Versions of other than the one supplied may not work with D.

To prepare a program for symbolic debugging, compile with the -g switch:

    dmd myprogram -g

To invoke the debugger on it:

    windbg myprogram args...

where are the command line arguments to myprogram.exe.

When the debugger comes up, entering the command in the command window:

    g _Dmain

will execute the program up until the entry into . From thence, pressing the F10 key will single step each line of code.

Basic Commands:

F5
  Go until breakpoint, an exception is thrown, or the end of the program.
F7
  Continue until cursor.
F8
  Single step, stepping into function calls.
F10
  Single step, stepping over function calls.

For more comprehensive information on windbg, consult the file .

Copyright © 1999-2007 by Digital Mars, All Rights Reserved | Page generated by Ddoc. | Comments