summaryrefslogtreecommitdiffstats
path: root/scripts/lib/devtool/ide_plugins/ide_code.py
diff options
context:
space:
mode:
authorEnguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>2024-02-25 21:47:01 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-02-27 11:38:46 +0000
commita5b75e29ff1163f433a707506161943289e98d6c (patch)
tree9e5641bdedfb800e7ee9801c69d13e5f5f34eed0 /scripts/lib/devtool/ide_plugins/ide_code.py
parent4c6f3bbc773f10bbfc9c45a7468c0f18d384ac16 (diff)
downloadpoky-a5b75e29ff1163f433a707506161943289e98d6c.tar.gz
devtool: ide-sdk source mapping for vscode
When launching the debug configuration, the source files from the debug rootfs were openened in the editor instead of the local workspace files. We add an exception to properly map them to the file being developed and compiled by the IDE integration. This also more closely matches what the user would expect compared to native development. This is also true for the devtool fallback mode. (From OE-Core rev: 24db2b8d0d7104960c1cdb2c7ee5216c830a6754) Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/devtool/ide_plugins/ide_code.py')
-rw-r--r--scripts/lib/devtool/ide_plugins/ide_code.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/lib/devtool/ide_plugins/ide_code.py b/scripts/lib/devtool/ide_plugins/ide_code.py
index d58d0bdc53..09f0bb2a07 100644
--- a/scripts/lib/devtool/ide_plugins/ide_code.py
+++ b/scripts/lib/devtool/ide_plugins/ide_code.py
@@ -242,6 +242,7 @@ class IdeVSCode(IdeBase):
242 if gdb_cross_config.image_recipe.rootfs_dbg: 242 if gdb_cross_config.image_recipe.rootfs_dbg:
243 launch_config['additionalSOLibSearchPath'] = modified_recipe.solib_search_path_str( 243 launch_config['additionalSOLibSearchPath'] = modified_recipe.solib_search_path_str(
244 gdb_cross_config.image_recipe) 244 gdb_cross_config.image_recipe)
245 src_file_map[os.path.join("/usr/src/debug", modified_recipe.pn, modified_recipe.pv)] = "${workspaceFolder}"
245 src_file_map["/usr/src/debug"] = os.path.join( 246 src_file_map["/usr/src/debug"] = os.path.join(
246 gdb_cross_config.image_recipe.rootfs_dbg, "usr", "src", "debug") 247 gdb_cross_config.image_recipe.rootfs_dbg, "usr", "src", "debug")
247 else: 248 else: