如何在android studio中启用堆栈跟踪?它的窗口在哪里?

Tah*_*her 5 android stack-trace android-studio

我开发了一个在 HTTP 执行方法中有问题的应用程序。有人建议我检查堆栈跟踪。但我不知道怎么做!

那么我该如何启用它呢?它的窗口究竟在哪里?

我放进--full-stacktraceFile > Settings > compiler > command-line options。所以我只在调试器窗口中看到线程和帧。

(我知道 log cat 并且我使用它,我需要使用堆栈跟踪)

nbo*_*ans 2

您正在寻找 Logcat。调出它的按键绑定是 Alt+6。您还可以通过单击 android studio 底部的它来调出它:

日志猫

也许您正在捕获异常但忽略结果,您可以像这样记录堆栈跟踪:

public void doSomething() {
    try {
        //do something that might throw an exception
    } catch (Exception e) { //be as specific as possible when catching an exception
        Log.e("ExceptionTag", e.getMessage(), e);
    }
}
Run Code Online (Sandbox Code Playgroud)