user1912987
user1912987

Reputation: 115

How to debug a lotus script agent inside a lotus script agent

I am debugging a lotus script agent using debug a lotus script. Agent is debugging fine but I have another lotus script agent inside that and my debugger is not going to that code line by line.Please help me how to do this. Thanks in advance.

Upvotes: 2

Views: 2958

Answers (2)

Tode
Tode

Reputation: 12080

An agent, that is called in script from another agent runs in the background. These agents can not be debugged easily. If the called agent runs on the server, you can use the remote debugger, to debug that agent: you have to enable it in the server document, start the remote debug task, and enable remote debugging in the properties of the called agent. Then you have to be fast. You define a delay that each agent waits for the debugger to attach, before it really starts with its code. During this time, you have to start the remote debugger, open the database and select the agent to debug... Quite painful. And the normal Debugger has to be off and the agent you startet has to run in client background mode, otherwise you will not be able to switch to remote debugger...

If both agents are LotusScript and it is not needed, that they:

Run with different rights or Run on different servers,

then there normally is no need for an agent calling another agent. Use script- libraries and subs / functions instead, then you do not need two agents...

Upvotes: 4

Mario S
Mario S

Reputation: 1984

I recommend to you use a simple log in the second agent. You can use NotesLog (look at Domino Developer's Help), or you can write your own class as you need it.

In my apps, I use a LotusScript framework, written by me. In that framework, I have a CS_Log class, who connects to a LogAgents.nsf database and writes all in simple documents. Also, I have a CS_Document class, with a Dump method, who writes the full content of a document, for example.

The most times, debugging it's the best option. But in cases like this, I prefer to write all in a log.

Upvotes: 0

Related Questions