formulahendry / formulahendry/vscode-code-runner

Why I cann't use start command to run my code without output by my Runner

Aperta
#435 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
2.4k
Fork
351
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

# Why I cann't use `start` command to run my code without output by my Runner

My English is poor.May be some worry in my words.

I find a strange thing in Coder Runner of VSCode of windows 10.

This is my CodeRunner setting about CPP.

```json
"cpp": "cd $dir && c++ $fileName -o $fileNameWithoutExt -finput-charset=utf-8 -fexec-charset=gbk && start $workspaceRoot/.vscode/Script/Runner $fileNameWithoutExt",
```

`$workspaceRoot/.vscode/Script/Runner`is a exe file which run a exe to calculate time and display returned value.

Like this:

![Runner's display](https://s2.ax1x.com/2019/02/25/k5JJPA.png)

Because, my `runInTerminal` is false.So the code is compiled in output and running in Runner.

To my mind,the output in VSCode will `Done` when the Runner is running.

Like this:

![Done](https://s2.ax1x.com/2019/02/25/k5YKWn.png)

By the other world,VSCode's ouput just compiles the code.when the Runner is running,the task of VSCode is over.Because give the run code to the Runner.So there is a `Done` word in output.

But,the fact is no `Done`.

Like this:

![Running](https://s2.ax1x.com/2019/02/25/k5Y2Yd.png)

The Runner is running,but there is no `Done` in output.

I consider the output is a special console,maybe VSCode's output cann't support the start command.so I change my setting to this.

```json
"cpp": "cd $dir && c++ $fileName -o $fileNameWithoutExt -finput-charset=utf-8 -fexec-charset=gbk && cmd /c \"start $workspaceRoot/.vscode/Script/Runner $fileNameWithoutExt\"",
```

But,it doesn't work.

![no done](https://s2.ax1x.com/2019/02/25/k5Yv60.png)

But, if there is powershell.It workes.

![Work](https://s2.ax1x.com/2019/02/25/k5tp0U.png)

The Runner is running and the output displaies `Done`.

But,opening powershell is slow.I hope it can be faster.

In addition,why do I need VSCode's ouput displaies done.

![Need](https://s2.ax1x.com/2019/02/25/k5tdAg.png)

Because,it cann't run two code in the sametime. And,I always need to compare the displays of tow code by myself.

All in all,The cost time which is form compling the code to running the code is lower by CodeRunner.And running the programm is in my Runner. And I can run mutiple codes in the same time.

Terminal is slow in VSCode.And there are many BUG in terminal with Chinese.

If you have other way to make it,please tell me.

Please,help me.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Reproduce the Windows 10 behavior with the shown C++ Code Runner setting, the start command, and the cmd /c variant, using the .vscode/Script/Runner executable. Compare these with the PowerShell command and inspect how Code Runner handles process completion and output when runInTerminal is false; done means concurrent runs behave as requested and the output reports completion consistently.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, powershell, vscode
Ambito
devtools, operating-systems
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.