use of org.exist.debuggee.Debuggee in project exist by eXist-db.
the class BreakpointSet method eval.
@Override
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
try {
Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
if (session == null)
return BooleanValue.FALSE;
StringBuilder sb = new StringBuilder();
sb.append(" -t ");
sb.append(args[1].getStringValue());
sb.append(" -f ");
sb.append(args[2].getStringValue());
sb.append(" -n ");
sb.append(args[3].getStringValue());
Command command = new org.exist.debuggee.dbgp.packets.BreakpointSet(session, sb.toString());
command.exec();
return BooleanValue.TRUE;
} catch (Throwable e) {
throw new XPathException(this, Module.DEBUG001, e);
}
}
use of org.exist.debuggee.Debuggee in project exist by eXist-db.
the class BreakpointList method eval.
@Override
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
try {
Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
if (session == null)
return BooleanValue.FALSE;
Command command = new org.exist.debuggee.dbgp.packets.BreakpointList(session, "");
command.exec();
return Utils.nodeFromString(getContext(), new String(command.responseBytes()));
} catch (Throwable e) {
throw new XPathException(this, Module.DEBUG001, e);
}
}
use of org.exist.debuggee.Debuggee in project exist by eXist-db.
the class Source method eval.
@Override
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
try {
Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
if (session == null)
return StringValue.EMPTY_STRING;
Command command = new org.exist.debuggee.dbgp.packets.Source(session, "f " + args[1].getStringValue());
command.exec();
return Utils.nodeFromString(getContext(), new String(command.responseBytes()));
} catch (Throwable e) {
throw new XPathException(this, Module.DEBUG001, e);
}
}
use of org.exist.debuggee.Debuggee in project exist by eXist-db.
the class StepInto method eval.
@Override
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
try {
Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
if (session == null)
return BooleanValue.FALSE;
Command command = new org.exist.debuggee.dbgp.packets.StepInto(session, "");
command.exec();
return BooleanValue.TRUE;
} catch (Throwable e) {
throw new XPathException(this, Module.DEBUG001, e);
}
}
use of org.exist.debuggee.Debuggee in project exist by eXist-db.
the class StepOver method eval.
@Override
public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
try {
Debuggee dbgr = BrokerPool.getInstance().getDebuggee();
IoSession session = (IoSession) dbgr.getSession(args[0].getStringValue());
if (session == null)
return BooleanValue.FALSE;
Command command = new org.exist.debuggee.dbgp.packets.StepOver(session, "");
command.exec();
return BooleanValue.TRUE;
} catch (Throwable e) {
throw new XPathException(this, Module.DEBUG001, e);
}
}
Aggregations