LF Fortran 95

How to Start and Terminate WinFDB

This section describes starting and stopping WinFDB from Visual Studio or without involving VS.

Starting WinFDB from Visual Studio

First, set the 'Use WinFDB' option to True on the 'LF Fortran' Debugging page by selecting Options from the Tools menu.

There are three ways to start the WinFDB debugger from Visual Studio:

If needed, the program will be rebuilt, and WinFDB will be started in a separate window.

If the program is a Console application, a console window will appear when the program begins execution.

Starting from the Command Prompt:

Type WINFDB followed optionally by the name of the executable file to be debugged:

WINFDB [filename]

Unless the full path of filename is provided, WinFDB will assume it resides in the current working directory.

Starting from the Windows desktop

Using Windows Explorer or the 'My Computer' folder, locate the program that you want to debug. Right-click on it and select 'Copy' from the context menu.

If a WinFDB icon is present on the desktop, right-click on it and select 'Paste' from the context menu. If there is no icon on the desktop, using Explorer or 'My Computer' you can locate WinFDB in LF95's bin directory and perform the paste operation to start debugging.

WinFDB should start with the executable ready to debug, and will look similar to this:

Providing Program Arguments

At this point, if needed, you can specify any command line arguments that the program being debugged might require using the 'Set Options' selection from the 'Program' menu:

When this option is selected, the 'Set Options' dialog appears:

Set command line arguments in the 'Program Options:' textbox and press the OK button. The command line arguments will be retained for the duration of the debugging session.

Starting Execution and Displaying Source Code

At this point, press the 'Go' () toolbar button. The debugger runs through the startup code, displays the source code for the main program and stops upon entry to the main:

Terminating the Debugger

Terminate the Debugger by selecting the 'Exit Debugger' command from the File menu in the debugger window, or clicking the 'Close' button in the titlebar.