- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Another reason for geting this message is that a breakpoint is set in a DLL that has not yet been loaded dynamically.

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