Windows phone 7 使用WPConnect从wp7获取脱机日志的命令?
我知道我们可以使用WPConnect工具从WP7设备获取脱机日志。但是我忘记了命令,也忘记了我从哪里学到的网址。有人知道这些命令是什么吗。我有以下代码来记录脱机异常,但我不知道如何检索日志文件。。请帮忙Windows phone 7 使用WPConnect从wp7获取脱机日志的命令?,windows-phone-7,windows-phone-7.1,error-logging,Windows Phone 7,Windows Phone 7.1,Error Logging,我知道我们可以使用WPConnect工具从WP7设备获取脱机日志。但是我忘记了命令,也忘记了我从哪里学到的网址。有人知道这些命令是什么吗。我有以下代码来记录脱机异常,但我不知道如何检索日志文件。。请帮忙 #region Offline Error Logger /// <summary> /// Logs Exception for the app when the device is not connected to the PC.This file can l
#region Offline Error Logger
/// <summary>
/// Logs Exception for the app when the device is not connected to the PC.This file can later be retrieved for the purpose of Bug fixing
/// </summary>
/// <param name="strMsg">Exception message</param>
private static void LogOffline(string strMsg)
{
恩迪夫
您是否在谈论此问题:?一旦完成日志记录,您实际上可以从设备或模拟器获取独立的存储文件,并将其存储在PC上。。您需要为它使用WPConnect,然后使用come命令来获取它。。。我以前做过,但是我忘记了命令!!!我找到了答案。我的问题有一部分错了。我很快就会编辑它
try
{
using (IsolatedStorageFile myIsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication())
{
string dirName = "SOSLog";
string logFileName = "SOSLog.txt";
string fullLogFileName = System.IO.Path.Combine(dirName, logFileName);
// TODO: Synchronize this method with MainPage using Mutex
string directoryName = System.IO.Path.GetDirectoryName(fullLogFileName);
if (!string.IsNullOrEmpty(directoryName) && !myIsolatedStorage.DirectoryExists(directoryName))
{
myIsolatedStorage.CreateDirectory(directoryName);
Debug.WriteLine("Created directory");
}
if (myIsolatedStorage.FileExists(fullLogFileName))
{
using (IsolatedStorageFileStream fileStream =
myIsolatedStorage.OpenFile(fullLogFileName, FileMode.Append, FileAccess.Write))
{
using (StreamWriter writer = new StreamWriter(fileStream))
{
writer.WriteLine(strMsg);
writer.Close();
}
}
}
else
{
using (IsolatedStorageFileStream fileStream =
myIsolatedStorage.OpenFile(fullLogFileName, FileMode.Create, FileAccess.Write))
{
using (StreamWriter writer = new StreamWriter(fileStream))
{
writer.WriteLine(strMsg);
writer.Close();
}
}
}
}
}
catch (Exception ex)
{
Debug.WriteLine("Exception while logging: " + ex.StackTrace);
}
}
#endregion