AvinZarlez / processing-vscode

A Visual Studio Code extension for the programming language Processing
https://marketplace.visualstudio.com/items?itemName=Tobiah.language-pde
MIT License
178 stars 25 forks source link

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

Open codevogel opened 5 years ago

codevogel commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 2 years ago

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 commented 1 year ago

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