In Notes V3, there is no debugger, so you can do the same things you can do if you didn't have a debugger in another language:
1) Use @Prompt() just like using print statements in programs
2) Use Debug Fields to display values
3) Use @Mailsend to send yourself mail messages detailing variable values or branching at selected points in formulas