MPLAB: sticking breakpoints [solution]

Thread Starter

0xFF

Joined Feb 26, 2008
12
While we're on the topic of MPLAB -- here's one that drove me nuts, until I figured out a solution! :)

(I did post this on another site already, so I'll simply quote it.)

Hi all;

Just a quick post to let others know of a potential problem with MPLab, with the C18 compiler installed. Actually, I don't believe that the C18 compiler causes the issue as I had previously seen it prior to the installation of C18.

Anyway, the problem is that a breakpoint, somehow, gets set and WILL NOT remove via the normal procedures (ie. Debugger -> Breakpoints) -- if you go there, you won't even see your breakpoint listed. If you go to Debugger -> Advanced Breakpoints, you will see a breakpoint set (with no way to edit it from that screen) -- in my case, it was program address 0x610 (note ADDRESS, NOT line).

This will drive you nuts trying to figure out why your program is terminating, without any breakpoints set. The only way that I have found to remove this, unwanted, breakpoint, is to do the following;

1) go to Debugger -> Advanced Breakpoints and find the program memory address that has a stuck breakpoint.

2) go to View -> Program Memory (unless you have it open already, in which case go to Window -> Program Memory.

3) scroll down the Program Memory window until you find the program memory address from above.

4) right-click the program line that the breakpoint is stuck on (remember, you WON'T see the read breakpoint icon) and chose "Set Breakpoint". You will now see the red breakpoint icon.

5) right-click the breakpoint again and chose "Remove Breakpoint".

6) You should now be able to go back to Debugger -> Advanced Breakpoints and see that the breakpoint has been removed. I have run into this at least twice lately and was able to resolve it with the above steps.

I hope this save someone some frustration someday!
 
Top