Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Current Open Sketch not Selected #1224

Open
momiccioli opened this issue Apr 4, 2021 · 4 comments
Open

Current Open Sketch not Selected #1224

momiccioli opened this issue Apr 4, 2021 · 4 comments

Comments

@momiccioli
Copy link

Hello,

this tool almost works for me and I would love to continue to use. The only thing preventing me from using it is that I have to manually select the sketch that I want verify/uploaded. I prefer that when I select the Verify or Upload it does this based on the current sketch that I have open. I work on many sketches at the same time so I switch often and this feature would be helpful.

Currently I use a make file and buttons that run scripts to accomplish what I just explained. While this works well your solution has advantages over mine except the one issue I have highlighted. If by chance that functionality is there please point me in the right direction and I will gladly try the product further.

Otherwise nice solution and keep at it.

@matthboers
Copy link

This has been a bit of a pain for me as well. Wish there was a option in the extensions settings to have the Verify and Upload buttons use the currently opened sketch, and not the last manually selected sketch. This would make the behaviour more congruent compared to the Arduino IDE.

In the meantime, I have found this older Issue (#807), where Iacerto linked a script which would clear the currently selected sketch from the arduino.json file. From what I gather, this makes it so that you have to manually reselect the sketch you want to compile every time, but it's better than debugging a sketch you have not even uploaded! 😉

@BelKed
Copy link
Contributor

BelKed commented Mar 26, 2022

If am I correct, there’s already opened a pull request that will add option for uploading and verifying sketch in active tab:

However, I have no idea why it’s not yet merged…

@MatthewSteeves
Copy link

I would really like this feature too. It was a stumbling block for me to use the Arduino extension in VS Code and I was confused at first as to how I was supposed to select the sketch.

Now that I know, it's not as big of a deal, I just use the shortcut to open Command Palette and start typing "sketch".

@ChitoKim
Copy link

ChitoKim commented Nov 1, 2023

I found a vscode extension exactly for this. Basically it's kinda add-on, because arduino extension is its dependency.
Also you can install it on vscode extension search : "Arduino Sketch Auto Switcher"
Finally I can stop debugging a code I wasn't looking for.
https://github.com/nosknut/arduino-sketch-auto-switcher

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants