Vscode-code-runner: `Stop Code Run` not working

Created on 28 Sep 2018  ·  11Comments  ·  Source: formulahendry/vscode-code-runner

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?

Most helpful comment

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

All 11 comments

I also have this issue

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

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

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

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

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

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

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.

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

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.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

w3adventures picture w3adventures  ·  3Comments

spacesuitdiver picture spacesuitdiver  ·  3Comments

rana picture rana  ·  5Comments

sstorey-nephila picture sstorey-nephila  ·  5Comments

eegod picture eegod  ·  5Comments