This code integrates LLDB remote debugging into Microsoft Visual Studio. This extension is developed and maintained by the Stadia team.
Download and install the latest Stadia SDK from the Stadia Partner Resource Center.
Check out the vsi-lldb source code. We recommend to start from the tag that corresponds to the SDK version number you installed, for example:
git checkout tags/1.57 -b <branch-name>
Initialize the required submodules:
git submodule init
git submodule update
Make sure the following tools are installed on your system (minimal recommended version is specified in parenthesis):
(Optional) Apply the recommended patches:
cd llvm-project
git apply ../patches/llvm-project/*.patch # Use "git am" to import as commits
These patches are not required, but they fix some bugs and performance issues.
Open the x64 Native Tools Command Prompt for VS 2017 (or 2019 if you plan to use only VS 2019).
Create a build directory inside llvm-project. Assuming your vsi-lldb project is located in C:\Projects:
cd C:\Projects\vsi-lldb\llvm-project
mkdir build_x64_optdebug
cd build_x64_optdebug
Run the following command (modify CMAKE_INSTALL_PREFIX, PYTHON_HOME, SWIG_DIR and SWIG_EXECUTABLE accordingly):
cmake ^
-DCMAKE_INSTALL_PREFIX='.' ^
-DLLVM_ENABLE_PROJECTS='lldb;clang;lld' ^
-DPYTHON_HOME=%LOCALAPPDATA%\Programs\Python\Python37 ^
-DSWIG_DIR=C:\Swig ^
-DSWIG_EXECUTABLE=C:\Swig\swig.exe ^
-DLLDB_ENABLE_PYTHON=1 ^
-DCMAKE_BUILD_TYPE=RelWithDebInfo ^
-DLLVM_USE_CRT_RELWITHDEBINFO=MT ^
-GNinja ^
../llvm
Run the build:
ninja install
Build.props file located in the root of the project and make sure PythonDir is pointing to the Python used to build LLDB and PythonVersion is correct.vsi-lldb.sln in your Visual Studio.Debug2017 or Debug2019 as a Solution Configuration depending on your VS version.YetiVSI is selected as a startup project.Note: if you are using the Stadia for Visual Studio extension distributed with the Stadia SDK, make sure to disable or uninstall it before debugging with the open-source version of the extension. Only one of these extensions should be active at each moment in order for the debugger to work.
Upon the attach to a remote process the debugger may need to download some data (e.g. process binary, shared libraries, debug symbols). We recommend applying the following patch to improve the download speed -- patches/llvm-project/0001-increase-buffer-size.patch.
This is not an officially supported Google product.