Closed NCC1701M closed 8 years ago
@NCC1701M does the command not stop on the integrated terminal or the external (system) terminal?
On the external (system) terminal.
Is this cmd.exe? VS Code should not have any effect on the external terminal, any other details? A screenshot might be helpful.
Yes, it's cmd.exe. Well it sometimes work and sometimes not but when it doesn't work it's always started via ctrl+shift+c from VSCode. Is there a special way VSCode starts cmd.exe?
I can post you a screenshot but you won't see when I hit ctrl+c
cmd.exe
is spawned with the following code:
private spawnTerminal(spawner, configuration: ITerminalConfiguration, command: string, path?: string): TPromise<void> {
let terminalConfig = configuration.terminal.external;
let exec = terminalConfig.windowsExec || DEFAULT_TERMINAL_WINDOWS;
// The '""' argument is the window title. Without this, exec doesn't work when the path
// contains spaces
let cmdArgs = ['/c', 'start', '/wait', '""', exec];
return new TPromise<void>((c, e) => {
let env = path ? { cwd: path } : void 0;
let child = spawner.spawn(command, cmdArgs, env);
child.on('error', e);
child.on('exit', () => c(null));
});
}
Where command
is %COMSPEC%
if it's defined, otherwise cmd.exe
. So this is the command that would be used:
%COMSPEC% /c start /wait "" cmd
You could try using the 64-bit cmd and see if that fixes your problem:
"terminal.external.windowsExec": "C:\Windows\SysWOW64\cmd.exe"
@NCC1701M you still having issues with this?
@Tyriar No I don't have the problem at the moment. I'd like to say it could be a OS problem but I had the issue on different machines with different OSs (Win 10 and Win 7) and only when I run it via CTRL+SHIFT+C from VSCode. But it is working at the moment. So I thing you can close this issue.
Thanks for the update :smiley:
Steps to Reproduce:
When you try to stop the running program with ctrl+c it isn't working. Tried it with the command mentioned above and also with "cordova run browser".
When you start a command prompt at the normal way it is working.