🧬Local Debugging
Debugging the kernel locally
Locally debugging the kernel allows you to diagnose the kernel directly on the host computer. Debugging information from different kernel components are saved to a kernel debugging file, kernelDbg-#.log
, where it is numbered depending on how many times the kernel is run.
Structure
The structure of the local debugging log is as follows:
Each of these fields have their own values, as follows:
date
: The date of the eventtime
: The time of the eventlevel
: One character error level, which is one of:T
: Trace verbose messageD
: Debug verbose messageI
: Informational messageW
: Warning messageE
: Error messageF
: Fatal error message
method
: The method name in which the message was postedsource
: The source code file where the method is foundlinenum
: The line number from the source filemessage
: The message
Debug your Mods
To debug your mods, they must call the debug functions in order for the kernel to acknowledge your message. There are useful functions listed below that may help you debug your routines in your mods.
Normal Debugging
Calling the debug function below will post your debug message to the kernel debugger normally. There's a function for you to call below:
Found in the DebugWriter
module under the KS.Kernel.Debugging
namespace.
Conditional Debugging
Calling the debug function below will post your debug message to the kernel debugger if the condition that you've set within the function is satisfied. There's a function for you to call below:
Found in the DebugWriter
module under the KS.Kernel.Debugging
namespace.
Stack Trace Debugging
Calling the debug function below will post the stack trace of an exception, including its inner exceptions, to the kernel debugger. There's a function for you to call below:
Found in the DebugWriter
module under the KS.Kernel.Debugging
namespace.
Stack Trace Conditional Debugging
Calling the debug function below will post the stack trace of an exception, including its inner exceptions, to the kernel debugger if the condition that you've set within the function is satisfied. There's a function for you to call below:
Found in the DebugWriter
module under the KS.Kernel.Debugging
namespace.
Last updated