Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/music.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ let disposal:
const CRASH_BREADCRUMB_KEY = "ace-step-progress-breadcrumb";

function recordBreadcrumb(title: string, detail: string): void {
// Mirror to the console so a tethered Web Inspector (iPhone debugging)
// streams the stages — the last line before "Webpage Crashed" is the
// memory-kill diagnosis.
console.info(`[ace] ${title}${detail ? ` — ${detail}` : ""}`);
try {
localStorage.setItem(CRASH_BREADCRUMB_KEY, JSON.stringify({ title, detail, at: Date.now(), open: true }));
} catch {
Expand All @@ -160,6 +164,7 @@ function reportCrashBreadcrumb(): void {
if (record.open !== true || typeof record.title !== "string") return;
localStorage.removeItem(CRASH_BREADCRUMB_KEY);
const when = typeof record.at === "number" ? new Date(record.at).toLocaleTimeString() : "?";
console.warn(`[ace] previous attempt ended unexpectedly during: ${record.title} — ${record.detail ?? ""}`);
supportWarning.textContent =
`The previous attempt ended unexpectedly during: ${record.title}` +
`${record.detail ? ` — ${record.detail}` : ""} (${when}). ` +
Expand Down
Loading