From 835b5e278e525dc628d4d0c085eb272996aed466 Mon Sep 17 00:00:00 2001 From: Tom Yang Date: Sat, 5 Oct 2024 00:29:44 -0700 Subject: Add warning message to `session save` when transcript isn't saved. (#109020) Somewhat recently, we made the change to hide the behavior to save LLDB session history to the transcript buffer behind the flag `interpreter.save-transcript`. By default, `interpreter.save-transcript` is false. See #90703 for context. I'm making a small update here to our `session save` messaging and some help docs to clarify for users that aren't aware of this change. Maybe `interpreter.save-transcript` could be true by default as well. Any feedback welcome. # Tests ``` bin/lldb-dotest -p TestSessionSave ``` --------- Co-authored-by: Tom Yang --- lldb/source/Interpreter/CommandInterpreter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lldb/source/Interpreter/CommandInterpreter.cpp') diff --git a/lldb/source/Interpreter/CommandInterpreter.cpp b/lldb/source/Interpreter/CommandInterpreter.cpp index d17aa6f..8d3a82e 100644 --- a/lldb/source/Interpreter/CommandInterpreter.cpp +++ b/lldb/source/Interpreter/CommandInterpreter.cpp @@ -3308,6 +3308,10 @@ bool CommandInterpreter::SaveTranscript( result.SetStatus(eReturnStatusSuccessFinishNoResult); result.AppendMessageWithFormat("Session's transcripts saved to %s\n", output_file->c_str()); + if (!GetSaveTranscript()) + result.AppendError( + "Note: the setting interpreter.save-transcript is set to false, so the " + "transcript might not have been recorded."); if (GetOpenTranscriptInEditor() && Host::IsInteractiveGraphicSession()) { const FileSpec file_spec; -- cgit v1.1