Short answer: Yes, you may leave the
debuglevel
attribute out as long as you set the debug
attribute totrue
.
From the
javac Ant task
documentation:
debug
Indicates whether source should be compiled with debug information; defaults to off. If set to off, -g:none will be passed on the command line for compilers that support it (for other compilers, no command line argument will be used). If set to true, the value of the debuglevel attribute determines the command line argument.
debugLevel
Keyword list to be appended to the -g command-line switch. This will be ignored by all implementations except modern, classic(ver >= 1.2) and jikes. Legal values are none or a comma-separated list of the following keywords: lines, vars, and source. If debuglevel is not specified, by default, nothing will be appended to -g. If debug is not turned on, this attribute will be ignored.
Therefore, setting
debug
to true
and omitting debugLevel
is the same as passing the flag -g
with no options appended. According to the javac
documentation, passing the -g
flag with nothing appended is equivalent to specifying sources, lines, and vars.
No comments:
Post a Comment