How to use Eclipse interactive console in debug

前端 未结 5 2150
情书的邮戳
情书的邮戳 2021-02-18 17:11

I\'m trying to play with debug in Android app and, when a breakpoint is encountered, Eclipse shows me a lot of windows, one of which is the \"Interactive Console\" with a prompt

相关标签:
5条回答
  • 2021-02-18 17:38

    It's possible you have other plugins installed that provide that view, and it's not meant to be used by Android Java code. See here (not accepted answer, but community-favored one).

    0 讨论(0)
  • 2021-02-18 17:52

    The "Interactive Console" within the Debug View of Eclipse is used whenever the debugged program expects some input from the console.

    0 讨论(0)
  • 2021-02-18 17:54

    use try{ statements...; } catch(Exception e){ System.out.println("the error message "+e); } will show the error messages.

    0 讨论(0)
  • 2021-02-18 18:04

    Window - Show View - Debug - Display

    That will provide you with a window to enter statements and execute/inspect them. This is a feature that's available in core eclipse platform. It works in most cases for Android based projects as well.

    More info on the display view can be found here : http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.user/reference/views/debug/ref-debug_view.htm

    For a nice overview of the debugging features of Eclipse, check out this post : http://www.cavdar.net/2008/09/13/5-tips-for-debugging-java-code-in-eclipse/

    0 讨论(0)
  • 2021-02-18 18:05
    1. You can use Logcat for and can see your check points using

      android.util.Log.e("","CheckPoint");

    2. You can toast your check points using Toast like:

      Toast.makeText(this, "Write here what you want see",1 or 0).show();

      1-> long time displaying and 0 for short time.

      This toast display in your device screen when programe running.

    3. You can use console screen for seeing output like print statements Ex---

      java.lang.System.out.print("Checking");

    0 讨论(0)
提交回复
热议问题