3.2 Special method in debugging code (advice code)

Special method

The following special method can be used
* Set classpath "bugdel_*.*.*/bugdelrt.jar", if you use special method in a evironment which is not Eclipse.

Special method Explanation since



bugdel.Bugdel.jump(int line)
jump to "line" number. (absolute jump) var1.4.0
bugdel.Bugdel.jump2(int distance)
jump to ("current line" + "distance"). (relative jump) var1.4.1
bugdel.Bugdel.breakpoint()
If program execute in the debugger of Eclipse, program is stopped (break). var1.4.0
bugdel.Bugdel.openEditor(String host, int port, String filePath, int line)
public static void openEditor(String host, int port, String filePath, int line){
java.net.Socket sock = new java.net.Socket(host, port);
try {
java.io.OutputStream outs = sock.getOutputStream();
String data = filePath + "[" + line + "]"; //protocol
outs.write(data.getBytes());
outs.flush();
outs.close();
} finally {
sock.close();
}
}
open the source file specified by filePath. see flash demo
port number is set by [Menu bar]-[Window]-[Preference]-[Bugdel] (default number 5555).
var1.4.8

bugdel.Bugdel.jump(int line)