- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Visual Studio 2012 (version 11.060315.01 Update 2), and Intel Fortran w_fcompxe_2013_sp1.1.139.
I am having difficulty seeing member variables of a user defined type in the debugger.
First, I define a type within a module.
module module1_mod
public
type testtype
integer, allocatable, dimension(:) :: ipt1
real, allocatable, dimension(:) :: rpt1
end type testtype
end module module1_mod
Note that this problem will fail with the members of the type being pointers instead of allocatable arrays also.
I have a program which passes a variable of type testtype to the subroutine.
program Console1
use module1_mod
implicit none
! Variables
type(testtype) :: amod
real :: arr(15)
interface asub
subroutine asub(amod, arr)
use module1_mod
type(testtype), target :: amod
real :: arr(:)
end subroutine asub
end interface asub
allocate(amod%ipt1(10))
amod%ipt1 = 1
allocate(amod%rpt1(10))
amod%rpt1 = 10.
arr = 15.
call asub(amod, arr)
end program Console1
I have even added an explicit interface so there is no ambiguity.
I call the subroutine:
subroutine asub(amod, arr)
use module1_mod
type(testtype), target :: amod
real :: arr(:)
type(testtype), pointer :: pt
pt => amod
amod%ipt1 = amod%ipt1 + 2
return
end subroutine asub
In the debugger, I cannot see the elements of amod. amod%ipt1 shows {...} but cannot be expanded; amod%rpt1 shows undefined address.
However, I can see the elements of the local pointer pt fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we're aware about the problem you described. For Intel(R) Composer XE 2013 SP1 Update 2 (released beginning February) it should be fixed. Please let us know whether it also works for you.
Best regards,
Georg Zitzlsberger
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This may not be relevant to your particular problem (I don't have VS2012 to test), but something to try - after the line in the watch window for the array or array component, that won't expand add a watch for a simple scalar. Often that seems to encourage the watch window to start behaving itself.
The other thing to try is to run the application a second time (the debugger appears to have more issues when debugging immediately after a build than it does debugging a second or subsequent run).
Also, using the immediate watch tip thing (move the mouse pointer over the name of the variable of interest, expand things) before using the watch window sometimes encourages the watch window to work.
Rather bizarre, but [occasionally, with poor reproducibility] true!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your suggestions.
I tried them but none of them were effective.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
we're aware about the problem you described. For Intel(R) Composer XE 2013 SP1 Update 2 (released beginning February) it should be fixed. Please let us know whether it also works for you.
Best regards,
Georg Zitzlsberger
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page