Debug Java From Lotus Notes Designer

We do not prefer to write agents in Java just because we are not able to debug the Java agent in Lotus Notes Designer. As we think Designer do not have any debugger for Java, but let me clarify that Lotus Notes Designer 8.5.x (also known as Domino Designer in Eclipse) has in-built Java debugger.

It is very clear that to write a Java agent we must extend AgentBase class and implement notesmain() function. So if our Java agent requires Domino Infrastructure to execute then how can we debug it? We have to make it a Java application to debug it. So we must define main function in our Java agent.

I am assuming the name of the agent class is MyAgent.

protected Session _goSession;
protected AgentContext _goCtx;

public MyAgent(){}

public MyAgent(Session s, AgentContext c) {
_goSession = s;
_goCtx = c;

public static void main(String[] args) {
Session s = null;


try {
s = NotesFactory.createSession();
// NotesMain(), the way Domino does
MyAgent a = new MyAgent(s, s.getAgentContext());

} catch (Exception e) {
} finally {
try {
if (s != null) s.recycle();
} catch (Exception x) {}
} // end main


After adding above code to your Java agent switch to Java Debugger Perspective and goto Debug Configuration and double click on Java Application in left side. Check stop in main option and click on debug button to start debugging.

I hope this helps you in debugging your Java agent. If any query feel free to write me back…:)

4 thoughts on “Debug Java From Lotus Notes Designer

  1. Hello, this is great but I am missing few points here

    I just have an Eclipse(Juno) and my lotus Notes client

    How can I build and debug from Eclipse instead of from Lotus ?
    I do not know where to get “Domino Designer” and how to install it in Eclipse

    Many thanks for any clues you can provide

    1. You can download Dmino designer from IBM website. Enable remote debugging through notes.ini file of your server and then you can debug it from eclipse too.

Leave a Reply

Your email address will not be published. Required fields are marked *