我正在嘗試使用Log.Info進行調試。我發現了一個非常大的限制,看來,它只能顯示 - Log.Info(tag, "this is an info message");
通知2個靜態字符串Log.Info是否損壞?
如果呼叫相線這一點 -
Log.Info(tag, MyClass.Property.ToString());
或
Log.Info(tag, "MyValue is =" + MyClass.Property.ToString());
或
string a = "AA";
Log.Info(tag, a);
所有這些都會炸燬程序,不會在記錄器中顯示或跟蹤。 有沒有更好的方法? 如何追蹤var值?
也作爲一個後想如何清除日誌?
Debug.WriteLine();
Trace.WriteLine();
Console.WriteLine();
你得到了什麼確切的錯誤? –
我猜測我得到一個運行時錯誤。模擬器打開,我可以看到程序加載,然後它只是傾倒出來,並顯示默認的模擬器頁面。 – Cadwell55