- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey everyone,
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:
C arrays.fr
INTEGER MYARRAY(20,5), MYARRRAY2 (20,6), ...
COMMON /BLOCKNAME/ MYARRAY, MYARRAY2, ...
INTEGER MYVARIABLE
Then in my solution i modify this global array and variable inside several called functions like below:
SUBROUTINE MYFUNCTION
include 'arrays.fr'
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!
Greg Brumbaugh.
Configuration:
Intel Visual Fortran Composer XE 2013 SP1 Update 6
Microsoft Visual Studio Ultimate 2013, version 12.0.40629
Windows 10 Enterprise version 1803
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Steve,
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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++.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>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.
FooBar::Array
FooBar_mp_::Array
FOOBAR::Array
FOOBAR_MP::Array
...
Generating a linker map file will aid you in finding the module name (and variable name) to use.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
FWIW
While I cannot test: Intel Visual Fortran Composer XE 2013 SP1 Update 6
Using 2019u3
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)
Jim Dempsey

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page