Search code examples
scalabreakpointsjdb

JDB ignores breakpoint for method in Scala object


I am using JDB to debug Scala code, and it mostly works so far. However, one particular breakpoint is never hit, and it is set on a method of a Scala object (on method entry, not on a particular line number).

As I step through the code I can see that method being entered, but the breakpoint is never ever hit, no matter how many times I try. Every other breakpoint I have set, including breakpoints on code in the same project, is hit.

$ jdb -version
This is jdb version 1.6 (Java SE version 1.6.0_23)

I have set the breakpoint both with and without the $-suffixed class name.

What could be the problem here?

There is no other method with the same name on that class, so even though I haven't told JDB the method argument types, that shouldn't matter - there's no overloading going on here.


Solution

  • I can't reproduce this after restarting jdb.

    In any case, I was accidentally using jdb from a different JDK (OpenJDK).