.vscode/vs-code-template.code-workspace.in |   40 ++++++++++-------------------
 1 file changed, 15 insertions(+), 25 deletions(-)

New commits:
commit 70ab33213c5d8f6fd6f58ae0115014c13224fde3
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Dec 23 17:21:23 2021 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Dec 27 12:30:16 2021 +0100

    vscode-ide-integration: don't abuse "folders" for workdir/instdir
    
    It is for multi-root workspaces. Use hardcoded subdirectory paths
    instead. Also see commit 411e8c24a289649797c679afc084113f7f61667a
        author      Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
        date        Fri Feb 12 12:29:18 2021 +0100
        vscode: make it work better when srcdir=buildir and add mac lldb config
    
    The problem it was addressing (VSCode unable to use second folder
    name that points to the same location) is still unresolved upstream.
    
    Fixing my mistake in commit 986e946d0cf3a6f61873efc09bab8c5e07c04f80
        author      Mike Kaganski <mike.kagan...@collabora.com>
        date        Wed Dec 15 14:19:31 2021 +0100
        VSCode IDE integration: add safe path for pretty printers
    
    This change reverts it partially.
    
    Change-Id: I6a6db189f587288f6eee0d9a5051bd9d8cf5a055
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127359
    Tested-by: Mike Kaganski <mike.kagan...@collabora.com>
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/.vscode/vs-code-template.code-workspace.in 
b/.vscode/vs-code-template.code-workspace.in
index 771080251a95..33d8f5e0b8e2 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -17,16 +17,6 @@
                        "name": "builddir",
                        "path": "@BUILDDIR@"
                },
-               {
-                       // This is BUILDDIR/workdir
-                       "name": "workdir",
-                       "path": "@WORKDIR@"
-               },
-               {
-                       // This is BUILDDIR/instdir
-                       "name": "instdir",
-                       "path": "@INSTROOT@"
-               },
        ],
        "settings": {
                "search.exclude": {
@@ -50,7 +40,7 @@
                // only used if the file doesn't match anything in the 
compile_commands.json - aka externals
                // libxml includes just added as example/for reference
                "C_Cpp.default.includePath": [
-                       "${workspaceFolder:workdir}/UnpackedTarball/**",
+                       "@WORKDIR@/UnpackedTarball/**",
                        "/usr/include/libxml2/"
                ],
                "C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
@@ -85,7 +75,7 @@
                                        "isDefault": true
                                },
                                "options": {
-                                       "cwd": "${workspaceFolder:builddir}"
+                                       "cwd": "@BUILDDIR@"
                                }
                        },
                        {
@@ -104,7 +94,7 @@
                                        "full make"
                                ],
                                "options": {
-                                       "cwd": "${workspaceFolder:builddir}"
+                                       "cwd": "@BUILDDIR@"
                                },
                                "problemMatcher": [] // don't ask when manually 
running the task
                        },
@@ -115,14 +105,14 @@
                                "command": "rm",
                                "args": [
                                        "-rf",
-                                       
"${workspaceFolder:workdir}/vs-code-temporary-user-profile"
+                                       
"@WORKDIR@/vs-code-temporary-user-profile"
                                ],
                                "group": "none",
                                "dependsOn": [
                                        "full make"
                                ],
                                "options": {
-                                       "cwd": "${workspaceFolder:builddir}"
+                                       "cwd": "@BUILDDIR@"
                                },
                                "problemMatcher": []
                        }
@@ -134,10 +124,10 @@
                                "name": "run in debugger after make",
                                "type": "cppdbg",
                                "request": "launch",
-                               "program": 
"${workspaceFolder:instdir}/program/soffice.bin",
+                               "program": "@INSTROOT@/program/soffice.bin",
                                "args": [],
                                "stopAtEntry": false,
-                               "cwd": "${workspaceFolder:builddir}",
+                               "cwd": "@BUILDDIR@",
                                "environment": [
                                        {
                                                // added in disabled form for 
convenience/as an example
@@ -157,12 +147,12 @@
                                        },
                                        {
                                                "description": "Mark 
pretty-printers (in solenv/gdb) safe",
-                                               "text": 
"add-auto-load-safe-path ${workspaceFolder:srcdir}",
+                                               "text": 
"add-auto-load-safe-path @INSTROOT@",
                                                "ignoreFailures": true
                                        },
                                        {
                                                "description": "Mark 
pretty-printers bootstrap (in instdir/program) safe",
-                                               "text": 
"add-auto-load-safe-path ${workspaceFolder:instdir}",
+                                               "text": 
"add-auto-load-safe-path @INSTROOT@",
                                                "ignoreFailures": true
                                        },
                                ],
@@ -170,7 +160,7 @@
                                        "miDebuggerPath": "/usr/libexec/gdb"
                                },
                                "osx": {
-                                       "program": 
"${workspaceFolder:instdir}/MacOS/soffice",
+                                       "program": "@INSTROOT@/MacOS/soffice",
                                        "MIMode": "lldb",
                                        "setupCommands": [
                                                {
@@ -190,12 +180,12 @@
                                //      "preLaunchTask": "remove profile-dir",
                                "type": "cppdbg",
                                "request": "launch",
-                               "program": 
"${workspaceFolder:instdir}/program/soffice.bin",
+                               "program": "@INSTROOT@/program/soffice.bin",
                                "args": [
-                                       
"-env:UserInstallation=file:///${workspaceFolder:workdir}/vs-code-temporary-user-profile"
+                                       
"-env:UserInstallation=file:///@WORKDIR@/vs-code-temporary-user-profile"
                                ],
                                "stopAtEntry": false,
-                               "cwd": "${workspaceFolder:builddir}",
+                               "cwd": "@BUILDDIR@",
                                "environment": [
                                        {
                                                "name": "SAL_LOG_DISABLED",
@@ -217,7 +207,7 @@
                                        },
                                        {
                                                "description": "Mark 
pretty-printers bootstrap (in instdir/program) safe",
-                                               "text": 
"add-auto-load-safe-path ${workspaceFolder:instdir}",
+                                               "text": 
"add-auto-load-safe-path @INSTROOT@",
                                                "ignoreFailures": true
                                        },
                                ],
@@ -225,7 +215,7 @@
                                        "miDebuggerPath": "/usr/libexec/gdb"
                                },
                                "osx": {
-                                       "program": 
"${workspaceFolder:instdir}/MacOS/soffice",
+                                       "program": "@INSTROOT@/MacOS/soffice",
                                        "MIMode": "lldb",
                                        "setupCommands": [
                                                {

Reply via email to