From 7b5967d699f4affd5a1d4b25a0259af6191ccb97 Mon Sep 17 00:00:00 2001 From: Andoni Morales Alastruey Date: Wed, 27 Sep 2023 10:52:08 +0200 Subject: [PATCH] vscode: fix launch from macOS Add a temporal fix for https://github.com/microsoft/vscode-cpptools/issues/8411 to support launching applications from macOS. Rather than using the meson-vscode.env, set the few variables required to launch GStreamer uninstalled. Part-of: --- .vscode/launch.json | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 5c6d0dde99..d0ff961d21 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,15 +12,26 @@ "windows": { "type": "cppvsdbg", "program": "gst-launch-1.0.exe", + "envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env", }, "osx": { - // https://github.com/microsoft/vscode-cpptools/issues/8411 "MIMode": "lldb", + // lldb-mi doesn't support large environment variables: https://github.com/lldb-tools/lldb-mi/pull/87 + "environment": [ + { + "name": "GST_PLUGIN_PATH", + "value": "${workspaceFolder}/${config:mesonbuild.buildFolder}/subprojects", + }, + { + "name": "GST_PLUGIN_SCANNER", + "value": "${workspaceFolder}/${config:mesonbuild.buildFolder}/subprojects/gstreamer/libs/gst/helpers/gst-plugin-scanner", + }, + ], }, "linux": { - "MIMode": "gdb" + "MIMode": "gdb", + "envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env", }, - "envFile": "${workspaceFolder}/${config:mesonbuild.buildFolder}/meson-vscode.env", "cwd": "${workspaceFolder}/${config:mesonbuild.buildFolder}/subprojects/gstreamer/tools/", "program": "${workspaceFolder}/${config:mesonbuild.buildFolder}/subprojects/gstreamer/tools/gst-launch-1.0", "args": [