- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In Visual Studio2008 Ioften right click a variable in order to set a watch on it in debug mode and this is fine for variables defined using standard data types but when I try it with a user defined data type variablesVS2008 hangs and I have to kill the process, reopen VS2008 and start all over. I am surprised that no one else has experienced this but I want to highlight it now so that it can be resolved for future udpates (probably by VS2010 integration).
I have encountered this problem consistently on different computers with different operation systems (XP, Vista XPx64)so I suspect it is an issue with IVF integration into Visual Studio.
Are you aware of this problem and if so is there a work round, apart from not using this method?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just so I understand, exactly what do you do to "set a watch"? Right click on the variable and select Add Watch?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I will elaborate further as I didn't explain fully what happens.
When I have a user defined type that has been given the allocatable attibute and this has been allocated.
eg
type TBUF
integer :: ival
real :: rval
end type
type(TBUF),allocatable :: buf(:)
integer :: i
allocate(buf(100))
do i = 1 , 100
buf(i)%rval = float(i)
buf(i)%ival = i
enddo
In the example above Ihave an allocated the user defined type. buf.If I set a breakpoint inside the loop and try to set awatch of the whole buf array I right click "buf" "Add Watch", this is fine, but if I want to watch the individual array component buf(i) (by highlighting buf(i)and then right clicking) VS2008 freezes before the Options list is displayed. This does not happen for normal arrays defined using standard data types.
I hope this explains it better.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the added details.
A workaround is in the Watch window, simply type buf(i) and press Enter. That will add the watch for you.
Escalated as issue DPD200154339.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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