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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Persistent breakpoints

Status
Not open for further replies.

AndrewMozley

Programmer
Oct 15, 2005
623
GB

I make lots of mistakes in my programs and use the debugger quite a lot.

Usually I include SET STEP in the code where I want to examine what is happening, and then either step through the code or set breakpoints using the F9 key.

In this case the breakpoints are identified with a red blob in the debugger window. When they are no longer required I can then remove them either by clicking F9 again on the relevant line or by clicking Tools | Debug in my main window (where my application is running) and Remove. In either case the red blob is removed and the line is no longer listed in the Breakpoints window.

Recently however I was debugging a form class on which part of the application is running. On encountering SET STEP the debug window came up; but after navigating to a point (inside a loop examining controls) and pressing F9, the red blob did not show. The breakpoint did appear in the list in the breakpoint window. When I tried to remove the breakpoint, this did not remove it from the list in the breakpoint window, but (I believe) created a duplicate entry in that list - I now have 4 identical entries!

In the breakpoint window I can click on ‘Clear All’. That does appear to remove them from the window, but if I close and then re-open the breakpoint window, there they are again, mocking me!

I have tried various things, like reverting to a previous foxuser.dbf and opening a different (.pjx) project, but no luck. Would be most grateful if anyone can help me resolve this.

Thanks. Andrew
 
Thanks Mike for your prompt reply. Have tried both these suggestions without success. Have also copied my shortcut to 'Start in' a new folder, but they are still there in Tools | Breakpoints.

Is it possible that these breakpoints are stored somewhere in the registry?
 
Breakpoints are stored in the Resource File (FoxUser.DBF). Look for a record with an ID of "BPOINTS". The format in the memo field with the data is plain text.

That said, I have run into "phantom breakpoints," VFP being convinced there's a breakpoint somewhere, but not showing it in the Breakpoints dialog.

See what happens if you run with SET RESOURCE OFF. If that fixes the problem, consider renaming your FoxUser file and building up a new one (or just removing the Debugger-related items from it).

Tamar
 
Thanks Tamar

I have tried that. Sadly the breakpoints still persist

Breaks_vvuzl6.png


I see that Mike Gagnon mentions a reference in VFPA. I am not familiar with VFPA, but could that be relevant - does anyone know?
 
Hi,
Try with Ctrl+Shift+F9 (when debug window is open)
Stay healthy,
Koen
 
Andrew, your screen shot suggests that you are just doing SET RESOURCE OFF by itself, and then still seeing the breakpoints. Have you actually tried clearing the breakpoints after your SET RESOURCE OFF?

Or, more drastically, delete FOXUSER.* before launching VFP. In theory, that should do the trick, although you will lose many of your customisations as well.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
AndrewMozley

There are a lot of bugs in VFP9 and Chen decided to fix them and call his version VFP10. Above is a link to 130 bugs he fixed in his new version including the invisible breakpoint. Some versions of Visual Foxpro advanced are free including a 64 bit version.



If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike G,

I might be wrong, but I think the bug that Chen has fixed is the one where the breakpoint appears against the wrong line - typically one or two lines before the one where it is supposed to appear. This is quite common; I have seen it many times, and I have always simply ignored it (although kudos to Chen for fixing it).

This is different from Andrew's bug, where the breakpoint cannot be removed.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
SET RESOURCE OFF

Thanks, Mike Lewis. That eventually fixed the program, probably when I followed your instruction to clear the breakpoints after calling SET RESOURCE OFF. And I am pretty sure that the foxuser file was (on my machine) in location users\desktop\appdata\roaming\Microsoft\Visual Foxpro 9. Suspect that I may be running as a pseudo-user called Desktop (yes, really) - that is another matter I need to clean up.

And thanks very much Mike Gagnon for explaining about VFPA. I can see that Mr Chen has done a huge amount of work. I see that I am running a 64-bit Windows 10 machine. How difficult is it to change to VFPA? Do users run it in tandem with VFP9 - I would be nervous about upsetting my existing applications.
 
AndrewMozley

You are running on Windows 64 bit, but your current VFP application is still 32 bit. If you want to use his version, I would recommend using the 32 bit version, the 64 bit version is limited in ActiveX support including 64 bit ActiveX. You can install VFPA side by side with you current version of VFP, no problem. He has also broken the 2gig barrier somewhat (up to 4 gigs I think). But since it is free, does not hurt to try it and the added bonus of 130 bug fixes.



If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Glad to hear that the problem is solved, Andrew. By the way, I hope you didn't spend too much time on my earlier suggestion of cleaning up the project. On reflection, I realise there is no way that breakpoints could be stored in the project file. After all, program code doesn't have to be contained in a project, and it can also be contained in multiple projects. The resource file is a much more plausible home for breakpoints.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
John Ryan gave a terrific session about VFPA on the first day of Virtual Fox Fest. We'll be making the videos of all the sessions public soon. Not sure exactly when, but tomorrow is the last day of the conference, so probably not before next week at the earliest.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top