formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.21k stars 297 forks source link

`Stop Code Run` not working #374

Open Alex-Khouri opened 6 years ago

Alex-Khouri commented 6 years ago

If I press Ctrl+Alt+M while code is running, nothing happens. Attempting to run the command by pressing F1 and selecting Stop Code Run also doesn't work, and results in the following error:

command 'code-runner.stop' not found

I've tried uninstalling and reinstalling the Code Runner extension, as well as disabling then re-enabling it, but the command still doesn't work. I've been testing the command using a simple infinite loop written in Python, so I know that it should be having some effect when I call it.

Is there anything else I can do to get it working? If not, could someone please fix the problem?

JackTheMeyer commented 6 years ago

I also have this issue

leeepenn commented 5 years ago

when i set "code-runner.runInTerminal": true, the command "code stop" doesn't work any more, if i set it false, Ctrl+Alt+M works. i have not found the way to solve the problem

leeepenn commented 5 years ago

when you set "code-runner.runInTerminal": true, although Ctrl+Alt+M doesn't work, you can click the "Kill Terminal" to kill the running thread 1546588778

miozus commented 5 years ago

Ctrl+Alt+N start code Ctrl+Alt+M stop code

JoeMaesai commented 5 years ago

For Mac control+option+N to start code control+option+M to stop code

cemtorun commented 5 years ago

That's beautiful, was searching for this forever! Thank's all!

Vulcanion97768 commented 4 years ago

I had to use the task manager to stop all the code from running.

paz10s commented 4 years ago

Ctrl+Alt+N start code Ctrl+Alt+M stop code

OP already mentioned that this shortcut doesn't work. Please don't post "solutions" that were already said to not work.

WoodpeckerBaby commented 4 years ago

Doesn't work.

Try this, make a new file hello.go and put the following in it, save and hit run.

package main

import "fmt"

func main() {
    i := 0
    for {
        fmt.Println(i)
        i++
    }
}

Ctrl+Alt+M and tl + shift + F5 do not stop code, and it will hang

The only solution is to press cmd +shift + P to open the command pallet and manually type in stop code run when it comes up in the options, hit Enter or click it. Then it will show something like this in the terminal.

[Done] exited with code=null in 82.937 seconds
user45256 commented 3 years ago

Me too, but i don't have this error:

command 'code-runner.stop' not found

after using shortcut Ctrl + Alt + M, it just doesn't do anything; I still can use "start run code" feature normally.

ShrimpDuck commented 3 years ago

Me too, but i don't have this error: after using shortcut Ctrl + Alt + M, it just doesn't do anything;

Hey man do you still have this problem? I've just come across it and I can't figure it out for the life of me

2033329616 commented 3 years ago

I have tried the method in issues 268, but I still can't use the Ctrl + Alt + M to stop the code, then I use Kill Terminal button to stop the code successfully.

mssdev7 commented 3 years ago

I HAD THE SAME PROBLEM!! I use the extension node.js in my vs code and to finish an JavaScript process i just had to use F9. I hope this help you...