开发者

Debugging a runnable groovy class via IntelliJ

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..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜