I wonder if JVM/javac is smart enough to turn
// This line... string a = foo(); string foo() { return bar(); } string bar() { return some-complicated-s
If you thrown an exception in bar() and print the stacktrace you'll see the whole path of calls... I think java honor all of them.
The second case is the same, debug is just a variable of your system, not a define as in C++, so it is mandatory to evaluate it before.