Docs

Crash reporter (window.Electron.crashReporter)

Read-only access to Electron's native crash reporting. Source: src/main/crash-reporter.ts, channel prefix crashReporter:*. The bridge method is always registered; whether crash collection is actually running is controlled by crashReporter.enabled in electron.config.ts — see App configuration.

Methods

Method Returns Notes
getLastCrashReport() Promise<{ date: Date; id: string } | null> null when crash reporting was never started (crashReporter.enabled is not set) or nothing has crashed yet.

Example

const report = await window.Electron.crashReporter.getLastCrashReport();
if (report) {
  // e.g. show a "we recovered, want to send details?" prompt on next launch
  console.log('Last crash:', report.id, report.date);
}

.safe

Fully mirrored — window.Electron.safe.crashReporter.getLastCrashReport() resolves { ok: true, data } / { ok: false, error } instead of throwing.

Last updated on July 18, 2026