Having issues trying to add a few global arrays to my watch in the VS debugger. Lets say I have the following file 'arrays.fr' in a separate include directory:
INTEGER MYARRAY(20,5), MYARRRAY2 (20,6), ...
COMMON /BLOCKNAME/ MYARRAY, MYARRAY2, ...
Then in my solution i modify this global array and variable inside several called functions like below:
MYARRAY(1, 1) = 1
MYARRAY(2, 1) = 2
MYVARIABLE = 1
Adding MYVARIABLE to the watch works fine, but when adding MYARRAY to a Watch, I get a CXX0017 Symbol not found error during debugging. When I enter the BLOCKNAME in the watch, I can get a memory address to the Common block, but I'm not sure if there is a syntax that can be used to access MYARRAY inside the BLOCKNAME somehow, other than directly accessing the memory locations. Would an Array Visualizer be a good tool in this context? Thanks for the help!
Intel Visual Fortran Composer XE 2013 SP1 Update 6
Microsoft Visual Studio Ultimate 2013, version 12.0.40629
Windows 10 Enterprise version 1803
The CXX error implies to me that Visual Studio is not loading the Fortran debugging support, and the C/C++ debugger doesn't understand Fortran arrays. You're using an old enough version that I don't remember what you might need to do to fix this, but you might try an uninstall and reinstall of Fortran.
I can confirm that my locally declared arrays are working fine with the debugger. I'll try an uninstall/reinstall and see if that helps with the issue.
The key to knowing if the Fortran support is loaded is how the debugger displays the datatypes of the variables. If it's in Fortran terms (REAL, INTEGER, etc.) then you have Fortran support. If it is "int", "float", etc., that's C/C++.
>>I can confirm that my locally declared arrays are working fine with the debugger....
If you have problems examining module arrays in Debug build, then for Debug build (read conditional code), in the routines in which context you desire to perform the Debug view, (conditionally) declare a pointer to the module array, and then at procedure start, associate the pointer to the module array. Klutzy to say the least, but it works.
Also, I seem to recall applying a scoping operator use to work. You may have to figure out the Intel Fortran decorated module name.
Generating a linker map file will aid you in finding the module name (and variable name) to use.
While I cannot test: Intel Visual Fortran Composer XE 2013 SP1 Update 6
The module name alone, case insensitive, worked
module mod real :: Array(10) end module mod program Foo use mod implicit none print *, "Break here, enter watch mod::Array" end program Foo
As I said in #5, some of the earlier versions suffixed _MP or _MP.... (something else I don't remember)