Since Notes/Domino version 7 I have used the principles in Bob Balaban’s “Two headed beast” (http://bobzblog.com/tuxedoguy.nsf/dx/the-2-headed-beast-debugging-domino-java-agents-with-eclipse) for writing Java agents in Eclipse that can be debugged! This works like a charm – the only thing is that I have had to copy/paste the code from Eclipse to the standard Notes agent.
With the current Eclipse version (8.5.3 FP2) of Domino Designer I tried to see if I could use the same setup to debug agents directly (as Java programs) in Domino Designer. It seems that I can make the code run, however, I cannot make it stop at any breakpoints. The message I get is:
Unable to install breakpoint in dk.domain.AgentTemplate due to missing line number attributes. Modify the compiler options to generate line number attributes.
I have tried to set the debug configuration to “Stop in main”. And it does seem to stop. However, if I step over, it runs all of the code – and I cannot see where in the code I am, and of course I cannot see the variables nor their values.
The option in Preferences – Java – Compiler to “Add line number attributes to generated class files” has been selected. I have not found other compiler option to generate line numbers.
I am using Java 1.5 compliance in Designer.
Has anyone been able to set this up??
/John
Well, sometimes you just have to explain your problem to find the solution.
In thoroughly describing the problem, I ended up trying to use a JDK 1.6 compiler compliance level (under preferences – Java compiler). And that actually worked!!!
So building an agent with a structure like this you can debug Java agents directly in Domino Designer:
I have left my “print” commands in the code for easier testing. Obviously, you would remove them from your real template.
Another thing that may have contributed to getting this to work is that I changed the case of the configuration parameters to match exactly the same upper/lower case as the directories are on the disk.
/John