[Libreoffice-commits] core.git: .vscode/vs-code-template.code-workspace.in

Christian Lohmaier (via logerrit) logerrit at kemper.freedesktop.org
Sat Feb 13 12:14:16 UTC 2021


 .vscode/vs-code-template.code-workspace.in |   59 ++++++++++++++++++++---------
 1 file changed, 41 insertions(+), 18 deletions(-)

New commits:
commit 411e8c24a289649797c679afc084113f7f61667a
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Fri Feb 12 12:29:18 2021 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Sat Feb 13 13:13:35 2021 +0100

    vscode: make it work better when srcdir=buildir and add mac lldb config
    
    Change-Id: I75b7104c98d187353bc3950ad51877f10ae04760
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110838
    Tested-by: Jenkins
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/.vscode/vs-code-template.code-workspace.in b/.vscode/vs-code-template.code-workspace.in
index 46f25dcd4f66..e86cecae4c80 100644
--- a/.vscode/vs-code-template.code-workspace.in
+++ b/.vscode/vs-code-template.code-workspace.in
@@ -36,12 +36,9 @@
 		// 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:builddir}/workdir/UnpackedTarball/**",
+			"@WORKDIR@/UnpackedTarball/**",
 			"/usr/include/libxml2/"
 		],
-		// adjust if necessary
-		"C_Cpp.default.compilerPath": "@GCC_HOME@/bin/gcc",
-		"C_Cpp.default.intelliSenseMode": "gcc-x64",
 		"C_Cpp.default.browse.limitSymbolsToIncludedHeaders": true,
 		"C_Cpp.default.cppStandard": "c++17",
 		// point this to LibreOffice's version of clang-format 5.0.0,
@@ -65,7 +62,7 @@
 					"isDefault": true
 				},
 				"options": {
-					"cwd": "${workspaceFolder:builddir}"
+					"cwd": "@BUILDDIR@"
 				}
 			},
 			{
@@ -84,25 +81,25 @@
 					"full make"
 				],
 				"options": {
-					"cwd": "${workspaceFolder:builddir}"
+					"cwd": "@BUILDDIR@"
 				},
 				"problemMatcher": [] // don't ask when manually running the task
 			},
 			{
 				"label": "remove profile-dir",
-				"detail": "removes the temporary user-profile profile directory",
+				"detail": "removes the temporary user-profile directory",
 				"type": "shell",
 				"command": "rm",
 				"args": [
 					"-rf",
-					"vs-code-temporary-user-profile"
+					"@WORKDIR@/vs-code-temporary-user-profile"
 				],
 				"group": "none",
 				"dependsOn": [
 					"full make"
 				],
 				"options": {
-					"cwd": "${workspaceFolder:builddir}"
+					"cwd": "@BUILDDIR@"
 				},
 				"problemMatcher": []
 			}
@@ -111,13 +108,13 @@
 	"launch": {
 		"configurations": [
 			{
-				"name": "run in gdb",
+				"name": "run in debugger after make",
 				"type": "cppdbg",
 				"request": "launch",
-				"program": "${workspaceFolder:builddir}/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
@@ -129,7 +126,6 @@
 				],
 				"externalConsole": false,
 				"MIMode": "gdb",
-				"miDebuggerPath": "/usr/libexec/gdb",
 				"setupCommands": [
 					{
 						"description": "Enable prett-printing for gdb",
@@ -137,6 +133,20 @@
 						"ignoreFailures": true
 					}
 				],
+				"linux": {
+					"miDebuggerPath": "/usr/libexec/gdb"
+				},
+				"osx": {
+					"program": "@INSTROOT@/MacOS/soffice",
+					"MIMode": "lldb",
+					"setupCommands": [
+						{
+							"description": "load helpers for for lldb",
+							"text": "command script import ${workspaceFolder:srcdir}/solenv/lldb/libreoffice/LO.py",
+							"ignoreFailures": false
+						}
+					]
+				},
 				"preLaunchTask": "full make"
 			},
 			{
@@ -147,12 +157,12 @@
 				//	"preLaunchTask": "remove profile-dir",
 				"type": "cppdbg",
 				"request": "launch",
-				"program": "${workspaceFolder:builddir}/instdir/program/soffice.bin",
+				"program": "@INSTROOT@/program/soffice.bin",
 				"args": [
-					"-env:UserInstallation=file:///${workspaceFolder:builddir}/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",
@@ -161,14 +171,27 @@
 				],
 				"externalConsole": false,
 				"MIMode": "gdb",
-				"miDebuggerPath": "/usr/libexec/gdb",
 				"setupCommands": [
 					{
 						"description": "Enable pretty-printing for gdb",
 						"text": "-enable-pretty-printing",
 						"ignoreFailures": true
 					}
-				]
+				],
+				"linux": {
+					"miDebuggerPath": "/usr/libexec/gdb"
+				},
+				"osx": {
+					"program": "@INSTROOT@/MacOS/soffice",
+					"MIMode": "lldb",
+					"setupCommands": [
+						{
+							"description": "load helpers for for lldb",
+							"text": "command script import ${workspaceFolder:srcdir}/solenv/lldb/libreoffice/LO.py",
+							"ignoreFailures": false
+						}
+					]
+				}
 			}
 		],
 		"compounds": []


More information about the Libreoffice-commits mailing list