@@ -22,13 +22,14 @@ fi
VSCODE_SETTINGS=$VSCODEDIR/settings.json
ws_builddir="$(echo "$BUILDDIR" | sed -e "s|$OEINIT|\${workspaceFolder}|g")"
+bb_dir="$(dirname "$(which bitbake)" | sed 's|/bin$||')"
# If BUILDDIR is in scope of VSCode ensure VSCode does not try to index the build folder.
# This would lead to a busy CPU and finally to an OOM exception.
mkdir -p "$VSCODEDIR"
cat <<EOMsettings > "$VSCODE_SETTINGS"
{
- "bitbake.pathToBitbakeFolder": "\${workspaceFolder}/bitbake",
+ "bitbake.pathToBitbakeFolder": "$bb_dir",
"bitbake.pathToEnvScript": "\${workspaceFolder}/oe-init-build-env",
"bitbake.pathToBuildFolder": "$ws_builddir",
"bitbake.commandWrapper": "",