Summary: This is a brief discussion about how to debug a JBuilder OpenTool. Debugging an OpenTool is not at all like debugging normal Java code, and a special technique is required, specifically starting one instance of JBuilder from an existing JBuilder environment. These notes apply to JBuilderX, and may not work for other versions.
Still working with the JBuilder OpenTool API ... one of the early problems I've run into with developing OpenTool's is the need to debug my OpenTool. I had a significant problem getting a tool to work, and could not figure out how to debug it. Then I realized that the problem is that the OpenTool is loaded during the JBuilder startup, and I simply was not going to be able to debug this like I "normally" would.
After a little digging I found some notes from Judd Solutions that were very close to what I needed. I couldn't get them to work exactly as they are written, but they were extremely close. The biggest problem was that some of the libraries they reference are not in my version of JBuilder. So, without any further ado, here are my adaptations of their approach:
lib directory to this library.Project | Project Properties, then select the Run module. Add a Runtime Configuration with the following attributes:
Make.Application.com.borland.jbuilder.JBuilder.-verbose -nosplashProbably the most unusual thing at this time is that you will have two JBuilder instances running. This could be a little confusing, but hasn't been a major problem yet. Another interesting thing is that when the second JBuilder instance starts its output is shown in the Messages Pane of the first JBuilder instance.
Post new comment