How to show full stack trace on eclipse?

前端 未结 7 1268
忘掉有多难
忘掉有多难 2020-12-01 20:20

I\'m using Eclipse to debug a Java application. Somewhere in the code I get an exception and the stack trace:

Caused by: java.io.EOFException: The connection         


        
7条回答
  •  情话喂你
    2020-12-01 21:14

    I have never seen that, but try this

    public void problemFunction(){
      try{
          //your code
      catch(Exception ex){
         ex.printStackTrace();
      }
    }
    

    or

    public void problemFunction(){
      try{
          //your code
         }
      catch(Exception ex){
         System.out.println(ex);
         StackTraceElement[] arr = ex.getStackTrace();
         for(int i=0; i

提交回复
热议问题