Breakpoint on variable change of value

Breakpoint on variable change of value

Does anyone know where a description of conditional breakpoints is located in the help file. I accidently stumbled on the edit/breakpoints dialogue and eventually figured out how to set a breakpoint on change of value, IF test, etc., but I cannot find anywhere a concise description with examples on all the types of breakpoints that can be set. A search for breakpoints in the help file gives only the following relevant entries - "viewing and enabling breakpoints", "setting breakpoint", and "debugging the squares example program", none of which give information on conditional breakpoints, etc. Also, a search for "conditional breakpoint" yields zippity. Maybe someone might want to update the help file so that this info is easily found since the debugger has these capabilites. It seems to me this is somewhat important information when it comes to debugging a program. Thanks for any information regarding this.

16 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Exactly the same thing happened to me. I had forgot how to debug with "conditional breakpoints", made all kinds of search in the Help and in on-line documentation with the same results as the author above. I remembered something from the old message board and tried to go there and read: that link wanted me to enter user name and password AND domain name, which I didn't know what should be. But now everything is gone and I get only "404 - The page can not be found"! (Where is the old message board, btw?). I was looking at all possibilities and options under the Project / Settings? and Debug menus and couldn't find anything, until, only by chance, I found that it was under the Edit (!!?) menu. I think also that there should be something about this in the documentation (which could easily be found - if there is something already).


I have VF 6.5A Standard running on a Windows 98 system, and I can't find the extended documentation on setting breakpoints there. I also have VF 6.5A Professional running on a Windows 2000 system along with the MSDN Library for January 2001. If I use Tools|Options|Help System and choose "Compaq Visual Fortran 6.5 (01/15/2001)" as my Preferred Collection, then I still can't find extended documentation on setting breakpoints. However, if I choose "MSDN Library - January 2001 (11/22/2000)" as my Preferred Collection, then the extended documentation becomes available.

The extended documentation includes the articles "Setting Breakpoints When Values Change or Become True" and "Using Advanced Breakpoint Syntax", both of which describe how to set many kinds of breakpoints.

I don't know if this extended documentation is on my Windows 2000 system because it has VF 6.5 Professional installed or because it has the MSDN Library installed. If it's due to the MSDN Library being installed, then my guess is that you can find the same documentation online at Microsoft's site.

Mike Durisin

See Setting Breakpoints When Values Change and Using Advanced Breakpoint Syntax.

How should I have formatted the above URLs so that they would've shown up as clickable links? Other people seem to know how to do that.

Mike Durisin

I just spoke with our writer to find out what happened here. Apparently someone thought that the feature didn't work with Fortran and removed the text about conditional breakpoints from the "Visual C++ User Manual for Visual Fortran". I've asked that it be added back.

Mike - formatting a URL is just simple HTML - use link description I've fixed your reply to make it a link.


Retired 12/31/2016

Hi Mike,

For example, typing in your message the text

[a href="" target="_blank"]Compaq support forum[/a]

of course, with [] replaced by <> creates a link to

Compaq support forum



Thanks for all the information

Tom Cole

We are adding new text on these conditional breakpoints (aka watchpoints) in the CVF Programmer's Guide, Debugger chapter. It only works under certain conditions, which is why it was accidentally removed before. Here's some of the text:

You can request that your program stop execution when a specific variable is set to a specific logical expression (watchpoint). Set an initial breakpoint to stop at a point in the routine before the variable to be watched is set.

When you run the program and the condition for the variable is met, a message box window is displayed informing you that the condition has been met. If you need to execute the code again, you need to stop at the initial breakpoint,
remove the original data watchpoint, and set the data watchpoint again.


Thanks for the info. However, I have found that you do not have to remove the breakpoint and reset it once a condition has been met, say I > 10. It will continue to stop at all subsequent conditions where I > 10. You may want to thoroughly test out the capabilities before updating the documentation.


I am trying to watch a logical for a change but it is not working.

Can anyone give me a short example so I can confrim I set it up correctly?

Also, are there any other settings(project settings) required to do this?


Here is how I have gotten it to work. First, you have to compile with debug options. Next, you have to set a breakpoint somewhere before an assignment statement that can change the value of the logical variable. Run the code and when the code stops at the breakpoint, click on "edit" then click on "breakpoints". Once the dialoque box comes up, click on the "data" tab. Enter the logical variable name that you want to the program to stop whenever the value changes. Then run the program again. I have tested this out and it works. Ignore the "enter the number of elements to watch in an array structure" dialogue. Let me know if this works for you.



Have you ever figured out why the edit feature doesn't work?


No, I don't know why edit doesn't work. I'll ask again. It works for moderators, though!


Retired 12/31/2016

We have expanded the section in the CVF Programmer's Guide on Locating Run-Times Errors in the Debugger. It has been reviewed and comments added, but it still needs another review pass.

For the next few weeks, the following zip file that contains this section is available (view pgxlocat.htm in a Web browser):

Customer comments within the next few weeks will be appreciated. To send comments on this revised section, send e-mail to with the following Subject line:

#CVF14443 - Comments on CVF PG Debugger chapter

Tried this method and I also got it to work. However, the watch variable is in a large If block and it stops at the end. Seems like I have to set it each time also.

I don't see the value of a break/watch if you have to set a break point before it every time. You should be able to set a break/watch and it should stop anywhere in the program it encounters the set variable.

Seems like this debugger is really weak. Just thinking how strong the AX fort ran debugger was with the ability to set traces, watches,breaks, and write results to file, etc.

I will try some more uses.

Is there any effort to improve debugger from compaq?


Ah, I see you used the Spell Check button. I suggest avoiding that.

We don't write the debugger - the basic capabilities are those provided by Microsoft. We do make it Fortran-friendly, but can't really add features. I agree that the OpenVMS debugger is much nicer, overall.


Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today