Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Is it possible to automatically terminate a processing Sketch by building a new one? #76

Open
codevogel opened this issue Oct 2, 2019 · 4 comments

Comments

@codevogel
Copy link
Contributor

codevogel commented Oct 2, 2019

If I press CTRL+SHIFT+B to build a new version of my Sketch and run it, and then edit a few variables, and press CTRL+SHIFT+B again, I'll get VSCode telling me the following:

image

Firstly, there is no keyboard shortcut for selecting either 'Terminate Task' or 'Restart Task', so you'd still have to use the mouse to choose either option.

Even if you restart/terminate the task, it will terminate the previous task, and potentially restart it again. This builds a new version of the sketch and runs it.

However, the previous Processing sketch will still be open. So you'll now be looking at two sketches, one old, one new.

Currently I have to close the processing sketch by first switching from vscode to the window, and then closing it, then switch back to vscode and CTRL+SHIFT+B again.

Is it possible to set it up in such a way that you could just press CTRL+SHIFT+B again and have it close your previous sketch and build and launch a new one?

I could set up something like a globally active AHK script that terminates the process with my sketches name whenever I press CTRL+SHIFT+B, but I can see that causing some potential issues as well.

Your help is much appreciated!

PS: I don't seem to be able to label this issue as a Question?

@AvinZarlez
Copy link
Owner

I'm not sure if this is possible given what I have access to in VSCode.

This may actually be fixed (or easier to fix) when I address #67 and have a custom terminal I can terminate when the extension is triggered?

@codevogel
Copy link
Contributor Author

Thanks for the reply.

If anyone knows of a work around (if there's some other way to terminate the task when you shut down the application), then please let me know.

@disuye
Copy link

disuye commented Apr 27, 2022

Just adding a reply to see if there is a workaround for this in 2022. Would love to be able to disable that dialog box! Thanks ;)

@potential-difference
Copy link

I found this workaround but cannot make it work for me - probably due to my inexpereince of this depth programming. Maybe someone else can figure it out.

https://stackoverflow.com/questions/76125453/in-vs-code-when-kicking-off-a-task-which-is-already-running-how-can-the-task-b

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

No branches or pull requests

4 participants