Eclipse Development Environment Debug mode debugging breakpoints jumping from jar to source
Note: This case uses Jsch-0.1.54.jar and source code to do test, the project is divided into two, one is Jsch source code, the other is a test case
First, download Jsch. 's jar package and source code http://www.jcraft.com/jsch/
Second, the new two projects are Jsch, Testdemo,jsch in the introduction of Jsch-0.1.54.jar source code, project structure such as
Sftpconnect.java
Package Com.kevin.test;import Com.jcraft.jsch.jsch;import Com.jcraft.jsch.jschexception;public class SftpConnect { public static void Main (string[] args) {Jsch Jsch = new Jsch (); try {jsch.removeallidentity ();} catch (Jschexception e) {// TODO auto-generated catch Blocke.printstacktrace ();}}}
Third, add a breakpoint on the Jsch function removeallidentity ()
Source code Jsch.java Add the source code
Edit source lookup for debug service under Debug view
Five, in the Sftpconnect.java right click on the debug as Java application, you can enter the debug mode, and then jump to the breakpoint in the source code.
Eclipse Development Environment Debug mode debugging breakpoints jumping from jar to source