I'm successfully debugging this script in Intellij:
println "a";
println "b";
开发者_如何学运维
But, when trying to debug the following script, my breakpoints aren't hit
public class Main implements Runnable{
public Main(String[] args) {
println("A"); // breakpoint
println "B";
}
void run() {
println "C"; // breakpoint
println "D";
}
}
Note that the script does run successfully, just without stopping at breakpoints.
FYI this bug is fixed in IDEA 11.1
This is correct main method signature:
static void main(String[] args) {...}
I believe that you should not expect for run() method to execute as you don't actually run it in a separate thread or invoke directly..
精彩评论