// jetty.port.jetty
DebuggingSource source = debugger.init("http://127.0.0.1:" + System.getProperty("jetty.port") + "/exist/xquery/fibo.xql");
assertNotNull("Debugging source can't be NULL.", source);
Breakpoint breakpoint = source.newBreakpoint();
breakpoint.setLineno(24);
breakpoint.sync();
String res = source.evaluate("$dbgp:session");
assertNull(res);
res = source.evaluate("let $seq := (98.5, 98.3, 98.9) return count($seq)");
assertEquals("3", res);
//xquery engine have problem here, because context not copied correctly
// res = source.evaluate("f:fibo(2)");
// System.out.println(res);
source.run();
List<Location> stack = source.getStackFrames();
assertEquals(1, stack.size());
assertEquals(24, stack.get(0).getLineBegin());
breakpoint.remove();
source.stop();
} catch (IOException e) {
assertNotNull("IO exception: "+e.getMessage(), null);