Search in sources :

Example 11 with Debuggee

use of org.exist.debuggee.Debuggee in project exist by eXist-db.

the class StackGet 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 Sequence.EMPTY_SEQUENCE;
        Command command = new org.exist.debuggee.dbgp.packets.StackGet(session, "");
        command.exec();
        return Utils.nodeFromString(getContext(), new String(command.responseBytes()));
    } catch (Throwable e) {
        throw new XPathException(this, Module.DEBUG001, e);
    }
}
Also used : Debuggee(org.exist.debuggee.Debuggee) Command(org.exist.debuggee.dbgp.packets.Command) XPathException(org.exist.xquery.XPathException) IoSession(org.apache.mina.core.session.IoSession)

Aggregations

Debuggee (org.exist.debuggee.Debuggee)11 IoSession (org.apache.mina.core.session.IoSession)10 Command (org.exist.debuggee.dbgp.packets.Command)10 XPathException (org.exist.xquery.XPathException)10 NumberFormat (java.text.NumberFormat)1 EffectiveSubject (org.exist.security.EffectiveSubject)1 Permission (org.exist.security.Permission)1 Subject (org.exist.security.Subject)1 DBSource (org.exist.source.DBSource)1 FileSource (org.exist.source.FileSource)1 Source (org.exist.source.Source)1 StringSource (org.exist.source.StringSource)1 Sequence (org.exist.xquery.value.Sequence)1