Dave's Brain

Browse - Programming Tips - How can I get line numbers into stack traces of my code?

Date: 2013nov20
Language: Java

Q.  How can I get line numbers into stack traces of my code?

A.  Use the -g option for javac.

In Ant use debug="on" like this:

<javac srcdir="${src}" destdir="${build}" debug="on"> ... </javac>

Add a comment

Sign in to add a comment
Copyright © 2008-2017, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.