I have a WebQuerySave event that is not running on the browser at all. There are print statements all over the agent and the associated script libraries, but all that comes up is the Form Processed page. It will have saved the document, but not run the agent.
I made a copy of the agent and changed it to run from the action menu. If I run it with debugger on, it opens debugger, but doesn’t open the code. I have the stop and close debugger options available and that’s all. If I run it without debugger on, I get the Object variable not set message and when I click ok, it either runs the agent or hangs my client.
I did find a thread about debugger not running if there are multiple script libraries, so that may answer that part of the riddle.
Subject: RE: Object Variable Not Set - very strange
I’ve never had any problem using the debugger with multiple script libraries. It might make a difference what order the script libraries have been compiled in relative to the code that calls them. You might try a “Recompile all LotusScript” and see whether that improves your debugging situation.
If you can’t get the debugger to work for you, you should still be able to see the Print output on your Notes client status bar as the code is running. If you get an error running a WebQuerySave, the Print output prior to that point is not displayed in the browser.
You can also use On Error to trap the error and use Print to display a more meaningful error message including function name and line number, as described in this article. Part 1 of the article also has a section about the specific error you reported.
A couple of suggestions. It may be is either a duplicate alias name or a duplicate agent name. Every time (since version 4.51) this happened to me, it was my bad!
Try making a dummy agent and connecting to that in your webWuerySave first. Then try your renamed local copy of the agent via the notes client and Agent Menu again.
What you are describing sounds like a problem in the Initialize() section of your agent or one of its libraries. The debugger cannot handle this type of code. The debugger is firing up, but not yet rendering to your screen (it doesn’t do that until after the Initialize() area, when it starts processing other code), hitting the bug and stopping.
Comb through your Initialize() areas, removing what you can for testing purposes, and you’ll track it down.