Phantom Breakpoints

I don't know what else to call them, but they are lines of code where the program, when in debug mode, stops as if it was a break point. There is no indication of a beak point being present and 'Delete All Breakpoints' has no effect.

this is the sketch code:

case 3:
				if (leverPosition_03 == normal)
				{	changeLocks(clear, route_1, locks_1); //clear the rest of the locks
					locks_1 = 0;
					blocks_1 = 0;
					timeEnd_1 = 0;
					pass_1 = 0;
					unlockReq_1 = 0;
					setAspect(ccd106E, approach);
					setAspect(homeSignal_R1, stop);
				}
				break;

The execution stopped at the line blocks_1 = 0;
This is the disassembly code

{	changeLocks(clear, route_1, locks_1); //clear the rest of the locks
00000B40  BRNE PC+0x39		Branch if not equal 
00000B41  LDS R24,0x02B4		Load direct from data space 
00000B43  LDS R25,0x02B5		Load direct from data space 
00000B45  LDS R18,0x02C2		Load direct from data space 
00000B47  LDS R19,0x02C3		Load direct from data space 
00000B49  MOVW R20,R24		Copy register pair 
00000B4A  MOVW R22,R18		Copy register pair 
00000B4B  LDI R24,0x00		Load immediate 
00000B4C  LDI R25,0x00		Load immediate 
00000B4D  RCALL PC-0x071C		Relative call subroutine 
					locks_1 = 0;
00000B4E  STS 0x02B5,R1		Store direct to data space 
00000B50  STS 0x02B4,R1		Store direct to data space 
					blocks_1 = 0;
00000B52  STS 0x02B7,R1		Store direct to data space 
00000B54  STS 0x02B6,R1		Store direct to data space 
					timeEnd_1 = 0;
00000B56  STS 0x02BE,R1		Store direct to data space 
00000B58  STS 0x02BF,R1		Store direct to data space 
00000B5A  STS 0x02C0,R1		Store direct to data space 
00000B5C  STS 0x02C1,R1		Store direct to data space 
					pass_1 = 0;

execution stopped at

00000B52  STS 0x02B7,R1		Store direct to data space

the line just below blocks_1 = 0;

I don't see anything unusual that would cause a break in the execution.

This is more of an irritation than a problem (I just hold down f5 for a few seconds), but once I have corrected one bug I'd rather not be encumbered with the remains of the debugging session while adding new functionality to the sketch. To add to the confusion, there was never a breakpoint on that line of code.

If anyone knows how to remove these phantom breakpoints I'd sure like to hear about it.

hacketet:
...debug mode...

Debug mode? What's that?

When starting the program with "Start Debugging and Break" I refer to it as "debug mode" - don't know if there is a generally accepted term for it.

hacketet:
...if there is a generally accepted term for it.

There no doubt is.

However, there is nothing similar in the Arduino IDE. Which means you are not using the Arduino IDE. Which means somewhere between "none" and "very few" of us on this side of your monitor know what you are using. Which means that, even including those who have general knowledge of how such things work, somewhere between "none" and "very few" will be able to help you. Solely because you have not provided enough detail.

Sorry about that - I'm using Atmel Studio 7 with an ICE interface on a Mega 2560 v3. Right now the sketch is well over 1000 lines of code and growing so showing all the code is not a good idea.

I noticed that there was another phantom breakpoint where blocks_1 was on the left side so thought it might be tracking the variable name. So I deleted the offending line, recompiled the code, Then re-entered blocks_1 = 0 just below timeEnd_1 = 0 and put it back in debug mode. This time the phantom breakpoint had moved to timeEnd_1 = 0 so it's tracking a particular line number, not the variable.

https://www.google.com/search?q=atmel+studio+saved+breakpoint

Edit the dot-suo file using your favourite text editor.