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

How to get more info from the debugger?

Massimo
Beginner
595 Views

In the old CVF, when a project was compiled in the "debug" configuration, I used to get a much more detailed information when an error occurred. For example, when an array had index 0, the error message showed not only the error code, but also the line number where the program stopped. In IVF this information is not shown, at least not by deafault. Is it possible to get it back in some way? Without that, the debugger is not of much help.

Thank you in advance.

0 Kudos
10 Replies
Steven_L_Intel1
Employee
595 Views
Actually, Intel Fortran shows you far more information about such errors than CVF did - but you may not be seeing it. In a console application, look for the console window that may be "behind" the debugger window. For example, here's what I get from a test program I constructed:

[plain]forrtl: severe (408): fort: (2): Subscript #1 of the array ARRAY has value 11 wh
ich is greater than the upper bound of 10

Image              PC        Routine            Line        Source
Console1.exe       000BB08A  Unknown               Unknown  Unknown
Console1.exe       000248FA  Unknown               Unknown  Unknown
Console1.exe       0002513E  Unknown               Unknown  Unknown
Console1.exe       000210C3  _MAIN__                     9  Console1.f90
Console1.exe       000C24C3  Unknown               Unknown  Unknown
Console1.exe       0006DF39  Unknown               Unknown  Unknown
Console1.exe       0006DDFF  Unknown               Unknown  Unknown
kernel32.dll       75DF339A  Unknown               Unknown  Unknown
ntdll.dll          77D99ED2  Unknown               Unknown  Unknown
ntdll.dll          77D99EA5  Unknown               Unknown  Unknown
[/plain]
Note that Intel Fortran tells you which subscript is out of bounds, what its value is and what the upper bound is. Like with CVF, the debugger stops at the point of the error.
0 Kudos
Massimo
Beginner
595 Views

Hi Steve,

thank you for your answer.

If I launch the debugger, here is the only window I get.

Debugger breakpoint dialog

If I hit "break", indeed I am brought to the location where the error occured - I hadn't noticed it before, sorry! But I do now see the console window. How to get it?

Thanks again!

0 Kudos
Steven_L_Intel1
Employee
595 Views
Look in your taskbar tray for the console window and click on it to bring it to the front.

FWIW, here is what CVF tells you:

[plain]forrtl: severe (161): Program Exception - array bounds exceeded
Image              PC        Routine            Line        Source
t.exe              00401023  MAIN$T                      3  t.f90
[/plain]
Which is more helpful?
0 Kudos
Massimo
Beginner
595 Views

I must sound really dumb, but I cannot find that window. Here is another screenshot.

Where is the console window?

0 Kudos
jimdempseyatthecove
Honored Contributor III
595 Views
Steve said look on the Task Bar

This is where your running application icons are located
Usually at the bottom of the display screen (not bottom of VS IDE Window as you illustrated)
The VS IDE is running in a different process from the application you are debugging (thus two Task Bar icons will be involved)

Note, depending on version of Windows, the icon might not look like a minituretypical black console window
If you cannot figgure it out, just click on each icon until it pops up.

0 Kudos
Massimo
Beginner
595 Views

I see! But the problem is that no console icons shows up. I know that the icons mean, no new icon shows up while debugging, nothing changes in the taskbar.

I am running Window 7 with Microsoft Visual Studio 2005 and Intel Fortran Compiler 10.0.3718.2005.

0 Kudos
Steven_L_Intel1
Employee
595 Views
Is your program a console application or some other kind? I will note that Intel Fortran 10.0 is not supported on Windows 7.
0 Kudos
Massimo
Beginner
595 Views

I think it is a console application (how to be sure?) It's not a quickwin, just plain old 77-like code.

You mean I have to buy version 11, don't you?

0 Kudos
Steven_L_Intel1
Employee
595 Views
For Windows 7, 11.1 is the oldest version we support. The current version is 12. I would expect, though, that a console application would create a console window as soon as it started. If you want to be sure, look at the project property Linker > System > Subsystem. It should say "Console" for a console application.
0 Kudos
Massimo
Beginner
595 Views

Thanks. It says "Console (/SUBSYSTEM:CONSOLE)". No icon however.

I'll try to squeeze some money out of the team budget to upgrade to version 12.

0 Kudos
Reply