Thursday, March 22, 2007

I ran into a problem debugging some code in a project I recently started on. In the past I guess I had taken this for granted since others set up the projects. This group works a bit differently with tests and projects. They manage all of their testing using Ant. A valid way of doing it just not what I am used to. In the past I had used junit test suites.

Sorry, I am getting away from the reason I am writting this post. I was attempting to debug an issue in the java code on a tomcat server. I had made my socket attach to the tomcat project started up in debug mode. When I started to debug my code would not hit the breakpoints I set. The next problem is when I finally found a spot in the code it did stop in the variables were undefined by name (I could not do an inspect on them). The values did show up in the variables tab in the debugger. However, it did not show the actual variable name, but showed them as an args array.

This is an issue with the build not my ide or tomcat or the way I am attaching to the debugger. To fix the issue I had to change the following line in the build script and add the "vars" argument to the javac task in my ant build.

Now I realize this is probably a rookie move but it was easily over looked and it took me some time to figure it out.

No comments: