From 57f42c087001628ba17fd70008d93fcc439c1dc6 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Fri, 10 Jan 2025 15:12:45 +0100 Subject: [PATCH] LSP: Submit the full backtrace to the crash reporter --- editors/vscode/src/extension.ts | 4 +++- tools/lsp/main.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/editors/vscode/src/extension.ts b/editors/vscode/src/extension.ts index 812abc6da0a..abdc2e23d56 100644 --- a/editors/vscode/src/extension.ts +++ b/editors/vscode/src/extension.ts @@ -179,11 +179,13 @@ function startClient( const location = new vscode.TelemetryTrustedValue( lines[1], ); - const message = lines.slice(2).join("\n"); + const backtrace = lines[2]; + const message = lines.slice(3).join("\n"); telemetryLogger.logError("lsp-panic", { version: version, location: location, message: message, + backtrace: backtrace, }); vscode.workspace.fs.delete(slint_lsp_panic_file); }); diff --git a/tools/lsp/main.rs b/tools/lsp/main.rs index 617013a9910..87701475e6b 100644 --- a/tools/lsp/main.rs +++ b/tools/lsp/main.rs @@ -245,6 +245,7 @@ fn main() { } else { writeln!(file, "unknown location") }; + let _ = writeln!(file, "{:?}", std::backtrace::Backtrace::force_capture()); let _ = writeln!(file, "{info}"); } default_hook(info);