nidefawl marked 2 inline comments as done. nidefawl added inline comments.
================ Comment at: lldb/tools/lldb-vscode/OutputRedirector.cpp:55 } - callback(StringRef(buffer, bytes_count).str()); + callback(StringRef(buffer, bytes_count)); } ---------------- mstorsjo wrote: > This change looks unrelated (although I'm not familiar with this piece of > code), although it's probably correct The reference to the StringRef is never stored, so this avoids a copy. VSCode::SendOutput takes a StringRef and explicitly converts it to std::string before emplacing it in the json message. ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1444-1449 + auto log_cb = [](const char *buf, void *baton) -> void { + g_vsc.SendOutput(OutputType::Console, llvm::StringRef{buf}); + }; + g_vsc.debugger = + lldb::SBDebugger::Create(true /*source_init_files*/, log_cb, nullptr); g_vsc.progress_event_thread = std::thread(ProgressEventThreadFunction); ---------------- wallace wrote: > could you test by creating a .lldbinit file with garbage so that the debugger > prints error messages during initialization, and then make sure that they are > properly redirected to the console of the IDE? Yes, I can see the error messages in the VSCode debugger console. Both on windows and linux. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123025/new/ https://reviews.llvm.org/D123025 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits