3

I want to crash an application in order to produce the crash report and view it in Console.app. However, running sudo kill <pid> or sudo kill -9 <pid> closes the application but does not produce the Crash Report. The same with Force Quit.

I also googled for any "malware" application that can temper with program memory, "like WinDbg" can for Windows, but I could not find anything. All Google searches containing "mac", "app", and "crash" are about solutions to preventing apps from crashing.

campovski
  • 177
  • 1
    Crash reports are designed to show you what caused the crash. If you cause the crash yourself, then you know how it happened. What's the point of doing this? – benwiggy Aug 12 '20 at 08:00
  • @benwiggy The point is just to learn new stuff. – campovski Aug 12 '20 at 09:29

1 Answers1

3

It turns out that sending SIGKILL (kill -9) to an application is a bit too abrupt, the same goes for SIGTERM (kill -15). Instead, sending SIGQUIT (kill -3) worked, and SIGABRT (kill -6). The application I killed was Activity Monitor, but it should work with other macOS applications as well (The real macOS ones, that ship with OS, Console works and Safari as well). You just need to wait a couple of seconds if the application killed had big memory footprint, because it takes some time to produce the Crash Report.

campovski
  • 177