Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugger stop where there is no breakpoints set. 1

Status
Not open for further replies.

Goofus828

Programmer
Nov 9, 2005
127
US
Hi all,

Sometimes when I have the debugger open with Trace, Watch and Local windows active my code will stop when there is no breakpoint set.

I've cleared all breakpoints, I've opened the Breakpoint dialog and made sure there is no breakpoints set at all.

I've deleted my foxuser.dbf.
I've deleted any configuration files that I might have saved via the debugger.

Have I missed something?

Very frustrating when it happens in a Scan/Endscan of 10,000+ records. [mad]

I've had to use this code to get around it:

Code:
IF .T.
     SET STEP ON
ENDIF

But having this peppered all over my code looks sloppy after a while.

Thanks!
 
When you say that your code "stops", what exactly are you seeing? Can you see the code in the Trace window, with the little yellow arrow pointing to a command? What I'm really asking is: are you sure the code isn't running?

Regarding your SET STEP ON code, how does that solve the problem? In fact, it will do the opposite of what you want. It will cause your code to suspend, but your problem is that it is suspending when you don't want it to.

Final point: why do you run the code with the debugger open if you don't want it to suspend? Why not just keep the debugger closed?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Hi Mike,

Yes, the Yellow arrow is pointing to a line of code, an IF statement, and the code is stopped at this point.

I usually run the code with the debugger open when I have a breakpoint set, otherwise it is closed.

The SET STEP ON is used in cases like this: the code at the top stops without a break point when I actually need to start tracing the code near the bottom with a breakpoint. So I close the debugger and when it hits the set step on is start tracing from that point.

 
hi Dave,

nope. I've clicked the red x on top of the hand icon on the debugger tool bar. Gone into the breakpoint dialog and there are no entries and there are no red circle in the code at all.

 
IIRC some breakpoint info is stored within the PJX/PJT table. So you might look there, too.
Also explains a few tricks to cause the debugger to stop with entries in the watch window. You might empty the list of expressions watched, too.

A good way to have a breakpoint with code rather is ASSERRT .F., it is disregarded in the compiled versions (DLL, EXE) and within the ide (_vfp.startmode 0) you can also turn off stopping at ASSERTS with SET ASSERTS OFF.

Bye, Olaf.
 
Olaf - you are a genius!

I opened the project and from the Project Menu, I clicked "Clean up project", then "Refresh" and that worked!

no more phantom break points.

Thanks to all for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top