Dbgp Howto needed [message #502040] |
Fri, 04 December 2009 21:15 |
John Updike Messages: 3 Registered: December 2009 |
Junior Member |
|
|
Dear Dltk users and developers,
I would like to find out how to use the Dbgp classes of Dltk in a minimal project. Unfortunately I am not able to understand the overall interaction of all Dltk classes (no documentation exists, does it?)
I try to do nothing more than starting a simple Dbgp server on port 9000 and then to connect with Activestate's pydbgp client (or any other client, if you have a better suggestion).
The following code continues until dbgp.waitTerminated(), and then waits forever. If I start the pydbgp script, some additional println statements in DbgpServer.workingCycle() show, that the connection is accepted and that DbgpServer.createSession() is called. But pydbgp just hangs and shows no initialization string.
I know, this is a stupid question. But how do I do something very simple, like sending the "feature_get" or "run" command to the pydbgp client???
Please help
John
Here comes my test class:
import org.eclipse.dltk.dbgp.DbgpServer;
import org.eclipse.dltk.dbgp.IDbgpServerListener;
import org.eclipse.dltk.dbgp.IDbgpSession;
import org.eclipse.dltk.dbgp.internal.DbgpDebugingEngine;
import org.eclipse.dltk.dbgp.internal.DbgpSession;
public class Main implements IDbgpServerListener {
public static void main(String[] args) throws InterruptedException {
new Main().runme(args);
}
private void runme(String[] args) throws InterruptedException {
DbgpServer dbgp=new DbgpServer(9000, 600000);
dbgp.setListener(this);
System.err.println("start");
dbgp.start();
System.err.println("started");
dbgp.waitTerminated();
System.err.println("terminated");
}
public void clientConnected(IDbgpSession session) {
System.err.println("client connected");
}
}
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02359 seconds