The LotusScript debugger isn’t the simplest thing in the world to use, especially when debugging form event code, where the fact of the debugger grabbing focus may change what happens.
You can put Print statements in LotusScript to do a less impactful debug, but these are hard to read and you can’t tell which messages are new — or which are repeats of the last message.
For a project I’m working on now, I wanted something easier to use. So I present the Pront Console. This is an NSF you download and install on your client, with a bit to put in your applications to make the Pront statement available.
Follow these steps to set the tool up for use.
- Add the NSF file in your Notes client data directory. It must be called prontConsole.nsf and be at the root of the data directory.
- Open the application in Domino Designer and go to the File Resources view. Export the file pront.lss to your Notes client application directory.
To use in an application
Open prontConsole.nsf in Domino Designer and go the to Script Libraries view. Copy the library Pront and paste it into any application from which you want to use this tool.
In the LotusScript code you want to Pront from, in the Options section add the statement:
Then wherever in your code you want to log a message to the Pront console, write:
Pront "your message"
Messages are shown in most-recent-first order and timestamped. When bunch come out in rapid succession, they are grouped together with a bracket symbol in the margin. You can copy from this window into your clipboard.
If you find this website helpful and want to give back, may I suggest buying, reading, and reviewing one of my excellent books? More are coming soon!
If you want email whenever there’s a new post, you can subscribe to the email list, which is 100% private and used only to send you information about stuff on this site.
You can have multiple Pront Consoles open at once, each associated with a different LotusScript code process. The window will not close itself when the calling script ends, to give you a chance to read the output if it’s from an agent, for instance. If you run the same script again, a new window opens for it.
There are situations where the Pront console window can’t be opened right away. These include when it’s invoked from the Queryopen event of a form, for instance. In that case, the code remembers the messages that were attempted to be posted, and next time a message is posted and the window can open, the previous messages are also shown.
The prontConsole database was created as a copy of a help database so it automatically opens in a new window as opposed to a new tab. It has special attributes I don’t think you can easily set in the UI.
The bulk of the code in the Pront script library is in an included LSS file to prevent accidentally stepping into it with the LotusScript debugger.