bmd-studio / stm32-for-vscode

STM32 extension for working with STM32 and CubeMX in VSCode
MIT License
195 stars 27 forks source link

CommandMenu Build vs tasks.json Build STM #164

Open bassbreaker opened 9 months ago

bassbreaker commented 9 months ago

In the tasks.json file, I made the "Build STM" task "dependsOn" another task (lets call it PreBuildTask). This works fine when running task Build STM. However, the PreBuildTask does not run when using the Build option in the command menu for the ST extension in the Activity Bar. I noticed in the src/menu/CommandMenu.ts script, the Build command simply runs stm32-for-vscode.build instead of executing the task in tasks.json. Is it possible to make the Build option in the Command Menu run the "Build STM" task instead?

jortbmd commented 9 months ago

Thanks for opening up an issue! This is an interesting one. For this to work I need to do some more task related setup e.g. setup a good task provider to provide the build, clean build and flash tasks. Might be worth it to do. For now the simple fix would be to use the shortcut ctrl/cmd+shift+b to launch the build taks. This would allow you to run the build task.

I will fix this in a next release as the current implementation is not how most build plugins do it. Will notify you once this has made it in the release.