Hello, I use KomodoIDE with NodeJs. I need to terminate NodeJS process (by manually pressing the square button on the bottom of console) and run it again - to see changes in preview. So I do it over and over.
I can assign Key binding to run command.
But how can I assign key binding to Terminate Process?
I tried recording macro in which i just press “Terminate Process” button, but it seems it wasn’t recorded.
But my question is how to terminate running process with a key or macro.
I know how to run a command. I’ve assigned command to start Node.JS server to key already.
But everytime I make changes in code I need to re-run the server. So first I need to terminate server to run it again.
The only option I know to terminate Process is to click on that square button on the bottom of console.
If you realy really want to go about it using the Command Ouput tab, I unfortunately don’t have the time to dig back into the code to figure out how you can do that but what I can do is point you at code that can start you into that digging.
The above code is what I believe is called when a Toolbox Run Command is started.
An example of running the current file with your configured NodeJS interpreter. You can run this in the JS console (View > Tabs & Sidebars > console) :
ko.run.runCommand(window, "'%(nodejs)' %F") // added quotes arround interpolation because path to interpreter might have spaces.
From here I’d see if there is either a way to see what processes are running and see if you can kill them with another command, or see if you can interact with the current Command Output tab directly.
Edit: When investigating writing JS or Python code that manipulates Komodo, you’ll use a Userscript in the toolbox to run it. You can run JS in the JS console (mentioned above) as well. Python custom code can only be run through a Toolbox Userscript.