microsoft / vscode-serial-monitor

Serial Monitor that allows for reading and writing to serial ports. Official issue tracking repository for Microsoft's Serial Monitor VS Code extension.
MIT License
55 stars 7 forks source link

Add a command to start / stop monitoring #188

Open thirstyice opened 2 months ago

thirstyice commented 2 months ago

Type: Feature Request

Would be very helpful if there were commands to start / stop monitoring so that those actions could be bound to keyboard shortcuts and included in tasks, for example before + after uploading code to an arduino

Workaround: Someone has created an extension for the sole purpose of closing ports before an upload

wallysalami commented 1 month ago

@thirstyice do you know how to automatically call this extension before upload? The marketplace page mentions "Add command for close before upload code (PlatformIO).", but it doesn't explain how to do it. I'm not finding this information anywhere.

thirstyice commented 1 month ago

What I did is create a task called "Stop monitoring" which calls the command to stop monitoring, then I created another task which calls the platformio upload command and which depends on the "Stop monitoring" task. Then I use my custom upload task instead of the built-in platformio one.