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

Unable to quick watch fortran arrays in Vs2012 debugger

libor_jendele
Beginner
465 Views

Hello, how can I debug Fortran arrays in MS Visual Studio 2012 debugger Quick Watch window? I'm using Visual Studio 2012, SP2 and Intel(R) Visual Fortran Composer XE 2013 Update 3 Integration for Microsoft Visual Studio* 2012, 13.0.3624.11, Intel(R) Visual Fortran Compiler XE 13.1.1.171 [IA-32].
See the code below: When I break the execution at the line "26 continue", open the debugger Quick Watch window and type "array", I get CXX0017:Error:symbol "array" not found.
Doing the same with VS2010 (and the same (new) Intel Fortran), the array "array" is printed as expected.
Note that in the both cases I'm using standard settings for Debug configuration, (Ia32).
Can you help me please? This bug make any Fortran development within VS2012 virtually impossible!
Thanks Libor

PS. The sample project attached.


The code, (Win32 console application, Debug configuration)

program FortranConsole1

implicit none
real*8 array(5,5)
integer*4 i,j

do 25 i=1,5
do 26 j=1,5
array(i,j)=i+j
26 continue
25 continue

! Variables

! Body of FortranConsole1
print *, 'Hello World'

end program FortranConsole1

0 Kudos
5 Replies
Anonymous66
Valued Contributor I
465 Views

We are not able to reproduce this issue with your program. The array shows up correctly in the watch window.

0 Kudos
libor_jendele
Beginner
465 Views

Hi, thanks for your response. I attached FortranConsol1.zip file that contains the whole errornes project and also ErrorScreenShot.png file that provides screen shot of the problem. I'll be more than happy, if you can advice me, what I'm doing wrong, or whar has changed in VS2012 and Intel Fortran XE2013 cooperation, because if I do the same application (with the same Intel Fortran) within the previous VS2010, everyting works fine! Hence most probably it has something to do with a change in VS2012 (SP2) compared to VS2010.

0 Kudos
libor_jendele
Beginner
465 Views

Hi,

I think I found the reason for the above problem. Neither Fortran arrays (and most probably nor any other Fortran variables) are properly displayed in Quick Watch VS2012 debugger's window, if your studio has checked the checkbox VS2012->Menu->Tools->Options->Debugging->Edit&Continue->Enable native Edit&Continue.

If this checkox is checked, the reported problems can be found. If it is unchecked, all Fortran variables (incl. arrays) are displayed fine. It is unfortunate, because the Edit & Continue feature is very useful and convenient feature. Although (very unfortunately) it is not supported by Intel Fortran, MS C++ doeas support it and hence I have it always checked on. (I'm using mixed programming, i.e. C++,C,Fortran).

The previous version MS VS2010 supported Edit&Continue for MS C++ and at the same tome Quick Watch debugging of Intel Fortran code!

PS. Note that in order to take effect as change of the Enable native Edit& Continue setting the whole project must be rebuilt!!! Looks like the setting changes generation of debug infos for the code and not only current behaviour of the debugger.

0 Kudos
Anonymous66
Valued Contributor I
465 Views

Thank you for the additional information.

When I enable native edit and continue, I get a warning stating that "Enabling native Edit and Continue disables data viewing enhancements in the debugger." This is what causes arrays not to be displayed properly. With this setting, visual studio disables support for viewing arrays.

Annalee

0 Kudos
Steven_L_Intel1
Employee
465 Views

More specifically, enabling "Native edit and continue" disables the Fortran debug support from loading at all. This is a Microsoft restriction.

0 Kudos
Reply