From 2ee8214485348685d26ea44e68ba0086ad942252 Mon Sep 17 00:00:00 2001 From: valeros Date: Mon, 14 Aug 2023 15:57:00 +0300 Subject: [PATCH] Use CC location for resolving toolchain path in VSCode template VSCode uses the "packagetoolchainBinDir" option to find the objdump binary and if GDB is shipped separately from the toolchain package then VSCode will fail to launch a debug session due to missing objdump --- HISTORY.rst | 2 ++ .../project/integration/tpls/vscode/.vscode/launch.json.tpl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/HISTORY.rst b/HISTORY.rst index 3925720382..d97b9b9eab 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -20,6 +20,8 @@ test-driven methodologies, and modern toolchains for unrivaled success. 6.1.11 (2023-??-??) ~~~~~~~~~~~~~~~~~~~ +* Resolved a possible issue that may cause generated projects for `PlatformIO IDE for VSCode `__ to fail to launch a debug session because of a missing objdump binary when GDB is not part of the toolchain package + 6.1.10 (2023-08-11) ~~~~~~~~~~~~~~~~~~~ diff --git a/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl b/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl index c419d27ed7..4bd188d2fd 100644 --- a/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl +++ b/platformio/project/integration/tpls/vscode/.vscode/launch.json.tpl @@ -17,7 +17,7 @@ % "name": "PIO Debug (skip Pre-Debug)", % "executable": _escape_path(prog_path), % "projectEnvName": env_name if forced_env_name else default_debug_env_name, -% "toolchainBinDir": _escape_path(os.path.dirname(gdb_path)), +% "toolchainBinDir": _escape_path(os.path.dirname(cc_path)), % "internalConsoleOptions": "openOnSessionStart", % } %