Bruno
Bruno

Reputation: 719

Programmatically pass device and svdFile to cortex-debug

We have a monorepo with about a dozen controller projects and are starting to move over to vscode and generally like cortex-debug a lot.

The only issue is that the number of projects x number of debuggers makes the dropdown to start a debug session a bit unwieldy. As we're already using things like "cwd": "${fileDirname}", it'd be great if we could set device and svdFile based on a config or env file in the respective project folder.

We already have a preLaunch task running a shell script with make etc, the problem here is that this runs in a different shell and thus setting env variables doesn't persist into the cortex-debug session. We also tried various ways to use project folder .vscode/settings.json's and then ${config:...} but cortex-debug doesn't seem like it can use those either.

Any thoughts and ideas, even if a bit hackish, very much appreciated.

Upvotes: 1

Views: 22

Answers (0)

Related Questions