diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp index 35a772c1454df..b4e11d20609d0 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp +++ b/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp @@ -416,6 +416,14 @@ ScriptInterpreterPythonImpl::ScriptInterpreterPythonImpl(Debugger &debugger) RunSimpleString(run_string.GetData()); run_string.Clear(); + // Configure pydoc (built-in module) to use the "plain" pager. The default one + // doesn't play nice with the statusline. + run_string.Printf("run_one_line (%s, 'import pydoc; pydoc.pager = " + "pydoc.plainpager')", + m_dictionary_name.c_str()); + RunSimpleString(run_string.GetData()); + run_string.Clear(); + run_string.Printf("run_one_line (%s, 'lldb.debugger_unique_id = %" PRIu64 "')", m_dictionary_name.c_str(), m_debugger.GetID());