Source-level Debugging Under NTSD

Last reviewed: November 2, 1995
Article ID: Q99053
The information in this article applies to:

   - Microsoft Win32 Software Development Kit (SDK) for Windows NT
     versions 3.1 and 3.5

The following are the steps used for source-level debugging under NTSD:

  1. Compile using -Zi and -Od.

  2. Link using debug:full and debugtype:coff.

  3. Load the program into the debugger.

  4. Use s+ to change to source mode.

    -or-

    Use s& to change to mixed mode.

For a console application, type "g main" to get to the program start. For a GUI application, type "g WinMain" to get to the program start.

Type "v .<number>" to list source lines starting at <number>. For example, type the following

   v .20

to see all lines starting at line 20.


Additional reference words: 3.10 3.50
KBCategory: kbtool
KBSubcategory: TlsMisc


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.