This is just my setup. It's not supposed to be merged into poky. However, it could be useful to have something similar in poky because if VSCode tries to index the build folder it runs until the OOM killer stops it. Depending on the configuration of the OOM killer it's also very likely that some other randomly selected tasks get killed. --- .vscode/extensions.json | 11 +++++++++++ .vscode/launch.json | 27 +++++++++++++++++++++++++++ .vscode/settings.json | 30 ++++++++++++++++++++++++++++++ oe-init-build-env | 8 ++++++++ 4 files changed, 76 insertions(+) create mode 100644 .vscode/extensions.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json
diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000000..09983dbc0dc --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,11 @@ +{ + "recommendations": [ + "EditorConfig.EditorConfig", + "EugenWiens.bitbake", + "maattdd.gitless", + "ms-python.isort", + "ms-python.python", + "ms-python.vscode-pylance", + "timonwong.shellcheck", + ] +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..145d2ab3e8c --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,27 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Python: bitbake -T-1 --server-only", + "type": "python", + "request": "launch", + "program": "${workspaceFolder}/bitbake/bin/bitbake", + "args": ["-T-1", "--server-only", "-DDD"], + "cwd": "${workspaceFolder}/build", + "envFile": "${workspaceFolder}/oe-init-build-env", + "console": "integratedTerminal", + "justMyCode": true + }, + { + "name": "Python: Current File", + "type": "python", + "request": "launch", + "program": "${file}", + "console": "integratedTerminal", + "justMyCode": true + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000000..4b61b35e1aa --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,30 @@ +{ + // Configure glob patterns of file paths to exclude from file watching. Patterns must match on absolute paths (i.e. prefix with ** or the full path to match properly). Changing this setting requires a restart. When you experience Code consuming lots of CPU time on startup, you can exclude large folders to reduce the initial load. + "files.watcherExclude": { + "**/.git/**": true, + "**/build*/cache/**": true, + "**/build*/tmp/**": true, + "**/downloads/**": true, + "**/sstate-cache/**": true, + "**/vscode-bitbake-build/**": true, + "**/workspace/sources/**": true + }, + // Configure glob patterns for excluding files and folders. For example, the files explorer decides which files and folders to show or hide based on this setting. + "files.exclude": { + "**/.git/**": true, + "**/build*/cache/**": true, + "**/build*/tmp/**": true, + "**/downloads/**": true, + "**/sstate-cache/**": true, + "**/vscode-bitbake-build/**": true, + "**/workspace/sources/**": true + }, + "python.analysis.exclude": [ + "**/.git/**", + "**/build*/**", + "**/downloads/**", + "**/sstate-cache/**", + "**/vscode-bitbake-build/**", + "**/workspace/sources/**" + ] +} diff --git a/oe-init-build-env b/oe-init-build-env index 38333ab8582..450ae71788c 100755 --- a/oe-init-build-env +++ b/oe-init-build-env @@ -51,3 +51,11 @@ unset OEROOT [ -z "$BUILDDIR" ] || cd "$BUILDDIR" + +# Generate a minimal env file which can be used e.g. to debug bitbake with a Python debugger +cat << EOFbuildenv > $BUILDDIR/.buildenv +BBPATH="$BBPATH" +BUILDDIR="$BUILDDIR" +PATH="$PATH" +BB_ENV_PASSTHROUGH_ADDITIONS="$BB_ENV_PASSTHROUGH_ADDITIONS" +EOFbuildenv -- 2.41.0
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#186465): https://lists.openembedded.org/g/openembedded-core/message/186465 Mute This Topic: https://lists.openembedded.org/mt/100876148/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-