Ralph
5/29/2012 10:07:00 PM
On Tue, 29 May 2012 13:29:01 -0700, BeeJ <nospam@spamnot.com> wrote:
>Two part question
>
>I am working with both VB6 file I/O and API file I/O.
>If while running in the IDE, I encounter a File I/O problem and I quit
>debugging the file may remain open or at least attached and cannot be
>opened again in the IDE or copied or opened with Notepad from Windows
>Explorer. If so, the trying to make subsequent runs is foiled since it
>will not open the file again. The only way I know to recover is to
>close the IDE and reopen the IDE and run again. This looses all the
>breakpoints and bookmarks.
>
>VB Reset in the code just before the next open attempts does nothing
>for the problem. Reset can't seem to get at the attached / open files.
>
>1) is there a way to force the IDE to close all files it has attached
>to?
>
>2) is there a way to capture and retain all breakpoints and bookmarks
>for an easier reload of the IDE and the app?
>MZTools has only (as far as I can figure) the ability to save favorite
>methods but not breakpoints and bookmarks.
>
Nope.
Won't say it is impossible but many have tried down the years and no
one has been successful. (There were a few utilities online that
supposedly worked for bookmarks - but generally failed when I tried
them.)
Bookmarks:
For returning to the same spot where you left off or any other spot,
you simply place an undeclared variable (with Option Explicit on), or
an operator out of context. Then when you open the IDE, and hit F5,
this will cause a syntax error and you will be immediately moved to
that location in the editor.
I use something like this ...
stopped_here, or thisisjumnk, or kkffjflslsl
Others with a tad more sophisticated will place a series of "!!!!",
"%%%", etc. after the line. Bob being 'classier' uses a double
dot/period at the beginning of the line.
For multiple bookmarks, MZTools' 'Favorites' works for me. Usually
gets me close enough, and then a comment or two, to fine tune the
closure.
Which leads to the most obvious solution - use comments. I use a
MZTools macro to add them ...
' BOOKMARK <fill in name>
Then I just search for "BookMark".
Breakpoints:
Simply insert the line ...
Debug.Assert False
Where ever you want the debugger to stop.
-ralph