1. 程式人生 > >Android 方法呼叫堆疊資訊顯示

Android 方法呼叫堆疊資訊顯示

使用該方法可以輸出呼叫這個方法的整個遞迴堆疊資訊。

public void printCallStatck() {
    RuntimeException here = new RuntimeException("here");
    here.fillInStackTrace();
    Log.w(TAG, "Called: " + mContext, here);
}