Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

unable to set breakpoints

chstoyer
Beginner
661 Views
I was trying to debug a program in CVF. I kept trying to set a breakpont. I kept getting the message "One or more breakpoints cannot be setand have been disabled. Execution will stop at the beginning of the program"
Very frustrating.
I read all the posts. I tried everything. Closed all windows. Cleared all other existing breakpoints. There was another project which shared some of the same source files. I blamed that. Cleared all breakpoints in that. Closed all windows in that.
I later was able to set a breakpoint in another place in the code and thus was able to solve my problem. Later I discovered the reason I could not set the breakpoint:
To make a long story very short, I was trying to set a breakpoint in what was dead code. I had moved some code into a subroutine and left it in the main program until I was sure the rest was working:
CASE (MENUTHIS)
CALL DO THIS(...)
CYCLE
DEAD CODE 1
DEAD CODE 2...
DEAD CODE N
CASE (MENUTHAT)
Moral of the story:
If you ever have a problem trying to set a breakpoint and having CVF/MS Developer Studio refuse to allow this breakpoint, before you go any further, make sure you are not setting a breakpoint in dead code.
Charles.
0 Kudos
3 Replies
ivfuser
Beginner
661 Views
Good advice. Another formula for frustration is having a lot of similar-looking conditionally compiled code. I burn myself about least once a month on this. It's kind of hard to set a breakpoint on a 'source' line that isn't a source line.
0 Kudos
aditya_achlerkar
Beginner
661 Views
Can you elaborate on "DEAD CODE"? cause I am having the same issue, but I have more things that has been added, I am using some c obj files as source for the main fortron calls. Do I need to do something special to resolve this?
aditya
0 Kudos
hweisberg
Beginner
661 Views
Another reason for geting this message is that a breakpoint is set in a DLL that has not yet been loaded dynamically.
0 Kudos
Reply