bin/gbuild-to-ide                        |    3 +++
 solenv/vs/Microsoft.MIEngine.Options.xml |    9 +++++++++
 2 files changed, 12 insertions(+)

New commits:
commit 54b5040e0842c85138bb9d800224016054f02778
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Nov 2 12:16:29 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Nov 2 13:43:51 2023 +0100

    VS IDE integration: enable Python pretty printers when debugging a WSL build
    
    See 
https://learn.microsoft.com/en-us/cpp/linux/deploy-run-and-debug-your-linux-project#debug-with-attach-to-process
    
    Change-Id: I16d50ebe5f087518de1953ea1f9aad4180714cc7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158789
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 928cde4ae9fc..ce89a979a1d0 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -968,6 +968,9 @@ class 
VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
             all_projects += projects
 
         self.write_solution(os.path.join(self.solution_directory, 
'LibreOffice.sln'), all_projects)
+        # this enables Python GDB pretty printers when debugging a WSL Linux 
build from VS
+        MIEngine_options_path = os.path.join(gbuildparser.srcdir, 
'solenv/vs/Microsoft.MIEngine.Options.xml')
+        shutil.copy(MIEngine_options_path, self.solution_directory)
 
     @staticmethod
     def gen_guid(category, name):
diff --git a/solenv/vs/Microsoft.MIEngine.Options.xml 
b/solenv/vs/Microsoft.MIEngine.Options.xml
new file mode 100644
index 000000000000..be9e9ee918f2
--- /dev/null
+++ b/solenv/vs/Microsoft.MIEngine.Options.xml
@@ -0,0 +1,9 @@
+<SupplementalLaunchOptions>
+  <AttachOptions>
+    <AttachOptionsForConnection>
+      <SetupCommands>
+        <Command IgnoreFailures="true" Description="Enable pretty-printing for 
gdb">-enable-pretty-printing</Command>
+      </SetupCommands>
+    </AttachOptionsForConnection>
+  </AttachOptions>
+</SupplementalLaunchOptions>
\ No newline at end of file

Reply via email to