diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/vscode.py @@ -548,7 +548,8 @@ 'pathFormat': 'path', 'supportsRunInTerminalRequest': True, 'supportsVariablePaging': True, - 'supportsVariableType': True + 'supportsVariableType': True, + 'skipInitFiles': True, } } response = self.send_recv(command_dict) diff --git a/lldb/tools/lldb-vscode/lldb-vscode.cpp b/lldb/tools/lldb-vscode/lldb-vscode.cpp --- a/lldb/tools/lldb-vscode/lldb-vscode.cpp +++ b/lldb/tools/lldb-vscode/lldb-vscode.cpp @@ -1194,7 +1194,10 @@ // }] // } void request_initialize(const llvm::json::Object &request) { - g_vsc.debugger = lldb::SBDebugger::Create(true /*source_init_files*/); + auto arguments = request.getObject("arguments"); + const auto skipInitFiles = GetBoolean(arguments, "skipInitFiles", false); + g_vsc.debugger = + lldb::SBDebugger::Create(!skipInitFiles /*source_init_files*/); // Create an empty target right away since we might get breakpoint requests // before we are given an executable to launch in a "launch" request, or a // executable when attaching to a process by process ID in a "attach"