← Back to context

Comment by WesolyKubeczek

5 hours ago

> I ran into a kernel panic specific to my macbook's hardware. How do I compile a new kernel with some extra debug printlns and boot it to figure out the panic?

1. You can find panic logs in Console.app. macOS writes them into NVRAM and stows away into files on its next boot. That will give you the process and kernel extension that was the culprit, and a stack trace.

2. sudo nvram boot-args="debug=0x122" or something like this will increase log output from the kernel. Those debug prints are probably there already. You can even attach a debugger running from somewhere else, presumably over Thunderbolt on newer machines.