Unable to remove breakpoints - phantom breakpoints

I have noticed that sometimes visual basic code I am running will break on a certain line, even after I have removed the breakpoint.

I am running my Visual Basic code in Microsoft Access.

What causes these "phantom" breakpoints to remain in the code, even after I have cleared and removed all of them.

This happens very infrequently but is very frustrating!

Any ideas?

Thanks
mateomateoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
are you doing

ctrl + shift + f9

to clear all breakpoints
0
GrahamSkanRetiredCommented:
Perhaps you have a Watch set to Break on Change or when a value is reached.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Generally, rebooting will clear the phantom breakpoints ...

mx
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

mateomateoAuthor Commented:
I can't remember if I used that keyboard shortcut, but i definitely went to that option in the menu to remove all breakpoints.

The only way that I had found to fix it was to delete the code for the whole procedure, save the Access file, then reopen the Access file, and then re-paste the code in where it was before.

I rarely use watches, and there were definitely cases where it was happening and I had never used a watch in that area of the code.

Based on how that was the only way I could fix it in the past, does that make you think of any other possible causes?

I think sometimes if stop the code in the middle of debugging, before removing the breakpoint. That seems to cause it to happen i think.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Also, if you have a BP set, and you Save the code then close the db ...

mx
0
Jeffrey CoachmanMIS LiasonCommented:
Is the code simply "Breaking", or is it actually breaking at a "Point" you never set?

In other words, is the "BreakPoint" designation present when the code breaks?

...if I am understanding your question...?




untitled.JPG
0
mateomateoAuthor Commented:
boaq2000:

It looks like your screenshot BUT WITHOUT the brown dot there.
There WAS a breakpoint there before, but it had been removed, before the code was run again(normal not debugging mode)

So I removed the breakpoint, but it still broke the code at the breakpoint, even after it was removed.
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Yes ... I get it ... I have seen many over the years.  Again, reboot has always cleared them out.  Various odd, hard to repeat reasons for occurrence ...

mx
0
mateomateoAuthor Commented:
Ok, I am about to split up the points for this answer.

Does anyone have any other suggestions besides reboot?

Or my solution of copy the code to text file, delete code in module, save module, close database, re-open, paste code back again.?
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
Try this procedure first:



Then, follow this procedure:

****
0) **Backup your MDB BEFORE running this procedure**
****
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
Close the mdb after the Compact & Repair.
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Close the mdb.
6) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
       >>Debug>>Compile
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

7) Close the mdb
8) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) before executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:

http://www.trigeminal.com/usenet/usenet004.asp?1033

AND ...
Once you get familiar with the Decompile idea (and ALWAYS make a BACKUP first!) ... you can add both Decompile and Compact/Repair to the Right Click menus in Windows Explorer, which I use multiple times daily:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
I've noticed that the phantom break point think seems to be synonymous with increased sun spot activity ... just an fyi ...

mx
0
Jeffrey CoachmanMIS LiasonCommented:
...and make sure you compact and repair the db, and compile your code on a regular basis...

This may be preventative...
0
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Systems AnalystCommented:
"Does anyone have any other suggestions besides reboot?"

This only happens to me on a very infrequent basis ... like, I don't think it's happened to me so far this year. I think the bottom line is ... BP's just get 'stuck' sometimes ... a fact of Access Life.

May The Code Be With You ....

mx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Applications

From novice to tech pro — start learning today.