formulahendry / formulahendry/vscode-code-runner

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

Open
#435 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.4k
Forks
351
PR merge metrics
No merged PRs in 30d

Description

# 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.