Package org.exist.debugger.model

Examples of org.exist.debugger.model.Breakpoint


      // 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();
     
      source.run();
     
      List<Location> stack = source.getStackFrames();
      assertEquals(1, stack.size());
      assertEquals(24, stack.get(0).getLineBegin());
     
      breakpoint.remove();

      source.run();
     
    } catch (IOException e) {
      assertNotNull("IO exception: "+e.getMessage(), null);
View Full Code Here


      // 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();
     
      source.run();
     
      List<Location> stack = source.getStackFrames();
      assertEquals(1, stack.size());
View Full Code Here

      // 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);
View Full Code Here

      // jetty.port.jetty
      DebuggingSource source = debugger.init("http://127.0.0.1:" + System.getProperty("jetty.port") + "/exist/xquery/debug-test.xql");

      assertNotNull("Debugging source can't be NULL.", source);

      Breakpoint breakpoint = source.newBreakpoint();
      breakpoint.setLineno(19);
      breakpoint.sync();

      source.run();

      List<Location> stack = source.getStackFrames();
      assertEquals(1, stack.size());
      assertEquals(19, stack.get(0).getLineBegin());

            String res = source.evaluate("$t:XML");
      assertNotNull(res);
            System.out.println("$t:XML: " + res);
            assertEquals("<root><a id=\"a1\"/><b id=\"b1\" type=\"t\"/><c id=\"c1\">text</c><d id=\"d1\"><e>text</e></d></root>", res);
      breakpoint.remove();

      source.stop();

    } catch (IOException e) {
      assertNotNull("IO exception: "+e.getMessage(), null);
View Full Code Here

      synchronized (breakpoints) {
        if (filesBreakpoints.containsKey(fileName)) {
          fileBreakpoints = filesBreakpoints.get(fileName);
         
          if (fileBreakpoints.containsKey(lineNo)) {
            Breakpoint breakpoint = fileBreakpoints.get(lineNo);
           
            if (!activeBreakpoints.contains(breakpoint)
                && breakpoint.getState()
                && breakpoint.getType().equals(Breakpoint.TYPE_LINE)) {
             
              activeBreakpoints.add(breakpoint);
              command.setStatus(BREAK);
              //waitCommand();
              //break;
View Full Code Here

  public Breakpoint getBreakpoint(int breakpointID) {
    return breakpoints.get(breakpointID);
  }

  public Breakpoint removeBreakpoint(int breakpointID) {
    Breakpoint breakpoint = breakpoints.get(breakpointID);
    if (breakpoint == null)
      return breakpoint;
   
    String fileName = breakpoint.getFilename();
    Integer lineNo = breakpoint.getLineno();

    Map<Integer, Breakpoint> fileBreakpoints = null;

    synchronized (breakpoints) {
      if (filesBreakpoints.containsKey(fileName)) {
View Full Code Here

TOP

Related Classes of org.exist.debugger.model.Breakpoint

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.