- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My understanding is that when I get an out-of-range subscript it is supposed to put me in the routine
where that occurred so I can look at variables in the same routine.
What is actually does: is put the little blue arrow in a place that has NOTHING to do with the routine,
so I cannot look at any variable in the routine. The call stack is completely wrong as well, so I cant use that either.
so - - I have to go back and insert a breakpoint(F9) near where the problem occurred, and/or stick in print statements, etc.
and run it again.
The text in the output is correct, BTW, it does tell you what line number, etc.
Ths problem seems to come up when the breakpoint is within an internal routine, i.e. one that comes after a CONTAINS statement.
Its a minor annoyance, but still I cant help but wonder why they did not test this ?? VS has been around for a long time, right ?
Link Copied
- 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
It generally does work. If you can provide us an example showing otherwise, we'd like to see it. A zip of a project folder is best.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, this example has several routines in it, but only one source file.
Is this sufficient ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would help if the assembly code has the source code interspersed - it does not.
but still, I cant look at the variables either.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you building without debug information, or optimized? I built and ran your program and it stopped in the right place, showing the variables. You have to use the Stack Frame pulldown (to the right of Thread, not visible here but it would be if the window were a normal size) to see the uplevel variables.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I dont get that "locals" or "call stack" window.
Is there something special I have to do?
Maybe I am using a VS that does not have those features ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What is strange is -
I can see all the variables when I use F9 to put a breakpoint in,
but as soon as it actually hits the out of range, the variable access disappears
I am using something called "VS shell?
Is that what I am supposed to have?
It looks like you have something developed later on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there an easy way to give you a screen shot of what I see ?
BTW, my stack frame does not show any of the routines in it.
so, somehow the debug info is getting lost when when it hits the subscript problem.
If there was any remote access, I could show someone very easily what is going on - -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The stach frame shows the routine if I put the F9 breakpoint in -
but then when I continue execution, the routines no longer appear there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of VS do you have?
It looks really snazzy - maybe I have an ancient one that has problems.
Should I be using something more up to date?
Is there a reason why I cannot ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here I used VS2015, but it shouldn't be different in the VS2010 (or 2013) Shell you have.
You may have deleted the various Debug windows. In the debugger, click on Debug > Windows and select Locals. If there are other windows you are missing, click on them too.
What version of Intel Fortran (Intel Parallel Studio XE) are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Under debug > Windows I only have:
1. Breakpoint
2. output
3. immediate
as choices.
I am using the most recent Fortran, I think 16.0, as per my subscription.
What is the easiest way I can you a screenshot ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
windows "snipping tool" works well bill to grab parts of the screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you see when you click Debug-Windows depends on whether you have started debugging already. Set a breakpoint at the first executable source statement in the main program, and run until that breakpoint is reached. Then, click Debug-Windows, and you will see many more choices than before.
More generally, in VS many menus change view in a context-sensitive way. For many users (especially casual users of VS such as me) this makes it difficult to answer "how do I get back to this menu that I saw one hour ago?". Even more difficult is to answer "how does this menu look on Billsincl's Visual Studio?" On the other hand, without this feature there would be a prohibitive amount of clutter. Many submenus and submenu items are often found in places that seem, to me, to be illogical. Likewise, screenshots may show the results of the train-wreck, but rarely give indications of what causes produced the train-wreck.
It is for these reasons and, perhaps, my general outlook, that I use the command line, a syntax highlighting editor with RE support and GNU make as my preferred development environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can get those windows, right up until the bad subscript -
but as soon as it hits the bad subscript, all the useful information disappears.
I dont get any variable contents, no green arrow, and no call stack,
the call stack is THERE, but does not contain any of the relavant routines
any longer.
so, maybe there is someone there that can answer this question?
Or do I need to get a later version of VS that has been debugged?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I should get a remote assist, so someone can actually SEE what is going on.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did a little experiment,
removed the routines so they are not contained within another routine.
Now it works like it supposed to.
so apparently the problem is triggered by using internal subroutines,
i.e with the CONTAINS statment. I wonder if this issue was addressed in a later version of VS ?
Well, when Steve ran his, we didnt see that any more, right ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried your program in VS2010 and got the same (good) results. When the array bounds error was reported, the debugger broke into the program at the right line and I could see the local variable IX.
Would you please attach a ZIP of the buildlog.htm from your project build? Maybe there's something else you're doing that isn't shown here yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I dont see any way to make a ZIP file.
How do I do that ? I guess its not included in Windows 10.
Apparently I cannot just send you the HTM file from the buildlog ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, now the darn thing works like it is supposed to -
What is really puzzling, is that I did not change anything regarding the way I did the build.
So now I have to figure out how to get the mistake back again.
Is this ZIP thing something I have to buy somewhere?
Why cant I send an HTM file directly?

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