Wednesday, January 27, 2010

ant compile without debug information by default

I've wrote a build.xml for a java project and found out that the application trace contained exceptions stack trace with "(Unknown Source)" instead of line numbers.
I found out that ant compile without debug information by default.

The way to set debug information is by adding
debug="true" debuglevel="lines,vars,source"
to the javac task.


1 comment:

  1. Guess that were aiming ANT's defaults towards production usage. But then again, still... if obfuscation really worth not being able to know in which line the software fails when the customer comes complaining.
    I say debug info should be on by default!

    ReplyDelete