formulahendry / vscode-code-runner

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

[Bug] executorMap commands fail to execute when Run in Terminal is set to True #725

Open senrada opened 3 years ago

senrada commented 3 years ago

Describe the bug

executorMap commands fail to execute when Run In Terminal is set to True

Actual behavior

terminal just hangs, no commands are executed. gcc does not run and the c file specified is not compiled. originally thought it was some random issue with trying to run the exe once it was compiled so i removed that part but it turns out nothing actually happens

Expected behavior

the commands to be executed

Screenshots image image terminal just hangs and i have to input a keyboard interrupt to stop it and get back to the terminal

lokesh-kurre commented 2 years ago

Well, I can't see a problem here, actual your command was to compile your c file, not to execute it. If you have made changes to execute file rest it to default. For Windows: "c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && .\$dir$fileNameWithoutExt", If you get error, you can try: "c": "cd $dir & gcc $fileName -o $fileNameWithoutExt & .\$dir$fileNameWithoutExt", Also be sure your filename must not contain space. Hope it helps!!