Skip to content

Commit

Permalink
尝试输出更多控制台日志
Browse files Browse the repository at this point in the history
  • Loading branch information
lindexi committed Mar 30, 2024
1 parent 065b717 commit 1601208
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions UnoSpySnoop/UI/UnoSpySnoopDebugger/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using dotnetCampus.Ipc.Threading;

using Microsoft.UI.Xaml.Data;

using UnoSpySnoopDebugger.Communications;
using UnoSpySnoopDebugger.IpcCommunicationContext;
using UnoSpySnoopDebugger.Models;
Expand Down Expand Up @@ -47,6 +48,11 @@ private async Task RefreshProcessInfoList()

var processes = Process.GetProcesses().ToList();

foreach (Process process in processes)
{
Console.WriteLine($"Process: {process.ProcessName}");
}

#if DEBUG
var currentProcess = Process.GetCurrentProcess();
var otherInstance = processes.FirstOrDefault(p => p.Id != currentProcess.Id && p.ProcessName == currentProcess.ProcessName);
Expand All @@ -68,6 +74,7 @@ private async Task RefreshProcessInfoList()
private async Task PeekProcess(Process process)
{
var peerName = $"UnoSpySnoop_{process.ProcessName}_{process.Id}";
Console.WriteLine($"Try peek {peerName}");

try
{
Expand Down Expand Up @@ -100,6 +107,7 @@ private async Task PeekProcess(Process process)
catch (IpcClientPipeConnectionException e)
{
// Connection Fail
Console.WriteLine($"Connection Fail {peerName}");
}
}

Expand Down

0 comments on commit 1601208

Please sign in to comment.