[@Formula]
- @Prompt and @StatusBar – the easiest way to debug code written on @Formula
- Field Debug_Fld := value_debug
- @MailSend – for code that runs on server (sch. agents)
- notes.ini - I don't like this approach because of size of variables
Example
strA := "ABC"; strB := "DEF";
strC := strA + strB;
@Prompt([ok]; "strC";"strC = " + strC);
@StatusBar("strC = " + strC);
Field Debug_FieldName := strC;
@MailSend("username";"";""; "debug strC"; ""; "strC = " + strC);
[Lotus Script]
- Lotus Script Debugger as tool for debugging
- Print, MsgBox, NotesLog, Stop, on erorr goto errh
Example
Dim strA As String
Dim strB As String
Dim strC As String
strA = "ABC"
strB = "DEF"
strC = strA & strB
Print "strC = " & strC
Msgbox "strC = " & strC
Stop 'enable debugger require
Dim currentLog As New NotesLog( “debug log 1" )
Call currentLog.OpenFileLog( "c:\log.txt" )
Call currentLog.LogAction( "strC = " & strC)
Call currentLog.Close
[Schedule Agents]
- remote debugger (it is easy to enable it if you read help)
- send an email, msgbox (log.nsf), noteslog
[JavaScript]
- alert(value);
- try – catch();
- Microsoft script debugger \ Mozilla firebug \ Chrom debugger
Lets catch the next simple error
Example
function add(frm){
var i1 = frm.Number1.value;
var i2 = frm.Number2.value;
var fld = frm.total;
fld.value = i1 + i2;
}
when we call function we will see next error:
[Java]
- Java debug console (System.out.println(“text”);
- Try / catch with NotesError and NotesException classes
- Remote java debugging with Eclipse
also I would like to recomend you external LN application openlog.nsf
No comments :
Post a Comment