i just wanted to know what you guys think about that and if somebody have a hint.
I´m working on a big application and at several places within my scripts i set breakpoints while debugging.
When i deleted the breakpoints they were still there. Because the breakpoint is bound to a line number in your code, and my code changed and grew the script stops now at a BLANK line!..
This is a little something I wrote quite some time ago after experiencing the same problem. It should do the trick.
dgg
Sub main()
On Error Goto errorHandler
Const PROFILE_NAME = "breakpoints_"
Const PROMPT_CHOOSEDATABASE = 13
Dim wrkspc As NotesUIWorkspace
Dim ndbTarget As NotesDatabase
Dim nclxn As NotesNoteCollection
Dim dclxn As NotesDocumentCollection
Dim docNote As NotesDocument
Dim i As Integer
Dim intCount As Integer
Dim strNoteID As String
Dim varDbSlxn As Variant
Set wrkspc = New NotesUIWorkspace()
varDbSlxn = wrkspc.Prompt(PROMPT_CHOOSEDATABASE, "Select database . . .", "Select the database for which breakpoints are to be cleared.")
If Not(Isarray(varDbSlxn)) Then
Print "Action cancelled . . ."
Goto thisExit
End If
Set ndbTarget = New NotesDatabase(varDbSlxn(0), varDbSlxn(1))
Set nclxn = ndbTarget.CreateNoteCollection(False)
Set dclxn = ndbTarget.GetProfileDocCollection({SNEPNNWEU}) '// that's "some non-existent profile name nobody will ever use"
nclxn.SelectProfiles = True
Call nclxn.BuildCollection()
strNoteID$ = nclxn.GetFirstNoteId()
intCount% = nclxn.Count
For i = 1 To intCount%
Set docNote = ndbTarget.GetDocumentByID(strNoteID$)
If Not(docNote Is Nothing) Then
If Strcompare(docNote.NameOfProfile, PROFILE_NAME, 5) = 0 Then
Call dclxn.AddDocument(docNote)
End If
End If
strNoteID$ = nclxn.GetNextNoteId(strNoteID$)
Next i
intCount% = dclxn.Count
If intCount% > 0 Then
Call dclxn.RemoveAll(True)
Print {Removed } & intCount% & { breakpoint profile documents in database "} & varDbSlxn(2) & {" . . .}
Else
Print {No breakpoint profile documents found in database "} & varDbSlxn(2) & {" . . .}
End If
If you set your breakpoints using the debugger (F10 isn’t it?) then from v6 of Notes there was a new feature added that enabled a memory of these breakpoints between code executions. However in my experience it tends to be a little over-zealous.
In user preferences, disable the option (located in the ‘Additional Options’ list box that says “Enable persistent breakpoints in LotusScript debugger” and then restart your Notes client(s).
I now use ‘stop’ in my code to make persistent break points. A simple find and replace can remove them when I am done.