Oct 6, 2010 1
how to debug fortran code using idb
debugging Fortran programs.
Compiling your Fortran program for debugging
To prepare your program for debugging when using the command line (ifort command):
In a command window, (such as the Fortran command window available from the Intel Fortran program folder), compile and link the program with full debug information and no optimization:
ifort -g file.f90 (Linux OS and Mac OS X) ifort /debug:full file.f90 (Windows OS)
On Windows OS, specify the /debug:full compiler option to produce full debugging information. It produces symbol table information needed for full symbolic debugging of unoptimized code and global symbol information needed for linking.
How to use Intel idb as debugger.
IDB comes with good help information
eg, (idb) help run
Run the debugger program.
Usage: run (arguments) (redirections) Arguments: Run the program with the specified arguments. Run the program with the specified input and output redirections.
If no arguments and redirections are specified, program is run with arguments
and redirections specified by previous “run” command with arguments or by “set
To run the exe in debug mode from command line, use devenv with debugexe option.. read more for How To Run .exe In Debug Mode Microsoft Visual Studio.
Eg. > devenv /DebugExe r280test01.exe
After windows debugger starts Hit F10 key to start debugging.
Check out How to use dbx as debugger for fortan debugging here.
Check out Debugging Fortran programs with gdb here
Intel® Debugger (IDB) Manual