Going to bed but i wanna show off my cool debugging system

This commit is contained in:
2026-02-01 23:02:53 -05:00
parent 6370a70e77
commit 6032a04ad9
20 changed files with 303 additions and 47 deletions

View File

@@ -0,0 +1,37 @@
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using Awperative.Kernel.Communication.Config;
namespace Awperative;
public static partial class Debugger
{
/// <summary>
/// True path of the log file Awperative dumps to.
/// </summary>
public static string LogFilePath { get; private set; }
/// <summary>
/// Sets up the Awperative debugger and finds the log file.
/// </summary>
internal static void Initiate() {
string directoryPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
if(directoryPath == null) throw new Exception("Failed to get directory path!");
if(!Directory.GetFiles(directoryPath).Contains(Config.logFileName + ".awlf")) throw new Exception("Failed to find log file!");
LogFilePath = Path.Join(directoryPath, Config.logFileName + ".awlf");
}
}