public void testDebuggerInvoke() {
    count = 0;

    MVELRuntime.resetDebugger();
    MVELRuntime.setThreadDebugger(new Debugger() {
      public int onBreak(Frame frame) {
        if (frame.getFactory().isResolveable("a1")) {
          a1++;
        }
        if (frame.getFactory().isResolveable("a4")) {
          a4++;
          System.out.println("HEI " + frame.getLineNumber());
        }
        count++;
        return 0;
      }
    });

    String src = "a1=7;\na2=8;\na3=9;\na4=10;\na5=11;\na6=12;\na7=13;\na8=14;";
    ParserContext ctx = new ParserContext();
    ctx.setSourceFile("mysource");
    ctx.setDebugSymbols(true);
    ExpressionCompiler c = new ExpressionCompiler(src, ctx);
    CompiledExpression compexpr = c.compile();

    System.out.println(decompile(compexpr));

    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 1);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 3);
    MVELRuntime.registerBreakpoint(ctx.getSourceFile(), 7);

    VariableResolverFactory factory = new DefaultLocalVariableResolverFactory();
    MVEL.executeDebugger(compexpr, null, factory);

    System.out.println(a1);
    System.out.println(a4);
    System.out.println(count);
    assertEquals(2, a1);
    assertEquals(1, a4);   // test passes but the breakpoint should be received by line 7, not by line 3
    assertEquals(3, count); // three breakpoints FAILS
  }