Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

debug from in command line

yjyincj
Beginner
475 Views

I have a project with a main file and 16 module files. The developping environment is win7+VS2008+InterVF11+IMSL library. When the project was under debug, something stange happened. An error window showed up said VS got error and windows is looking for solution. After a while, it told me that VS has to be shut down. I have no idea what is wrong with my code or just because of VS. So I tried to debug from command lines. This is what I did:

1) build the project with debug option

ifort /debug:all /Od main.f90 module1.f90 ....... module16.f90


2)call VS GUI

devenv /debugexe main.exe

VS2008 GUI was successfully opened and the exe was executed well. I want to set a breakpoint so that I might be able to figure out what had happed when I built from the IDE. But it does not stop at the break point I set. According to this thread,

http://software.intel.com/en-us/articles/debug-windows-fortran-application-from-command-line/

I set line 23 at _MAIN__ . But it did not stop.

So any suggestion on the strange VS2008 behavior or debugg in command line are appreciated.

0 Kudos
1 Reply
Lorri_M_Intel
Employee
475 Views

There are many other options set by default in a DEBUG configuration, and perhaps one of them is causing your difficulties

I would try disabling warn:interfaces first and then do a rebuild. Did it crash? If that worked, I might try disabling check:bounds. If that stops the VS2008 crash, I would re-enabled check:bounds , one at a time, on each of the 16 source files, to see if perhaps there is an out-of-bounds reference that is combining with the added run-time check to provoke the crash.

- Lorri

PS: When I use devenv to debug an executable that was not built within Visual Studio, I open the main program and set a break using the source editor. That usually works for me. (Yes, even when I didn't use Visual Studio to create the executable.)

0 Kudos
Reply