vscode-code-runner icon indicating copy to clipboard operation
vscode-code-runner copied to clipboard

[Feature request] Run exe

Open 3C0D opened this issue 7 months ago • 5 comments

Is your feature request related to a problem? Please describe. When right clicking in explorer make possible to run an *.exe.

Describe the solution you'd like "exe": { "windows": "& './$fileName'", "linux": "'./$fileName'", "osx": "'./$fileName'" }

3C0D avatar Jul 30 '25 23:07 3C0D

"code-runner.executorMap": { "code-text-binary": ".\$fileName",

~~already available~~ ~~make sure vscode views your .exe files as code-text-binary~~

ericchase avatar Oct 17 '25 09:10 ericchase

ok, you are right, if the file is open it will run, but seems like it won't run from the menu

ericchase avatar Oct 17 '25 09:10 ericchase

might add this to my fork

ericchase avatar Oct 17 '25 09:10 ericchase

In fact, I found an extension called "exe runner." However, it would be a good thing to have this logical feature in Code Runner itself.

Another thing I've noticed: when a script is already running and you click the Code Runner button again, nothing happens. It would be really useful to have an option to automatically kill the current process before starting a new one. Maybe with a short debounce timer (300-500ms) to prevent accidental spam from multiple clicks. I tried adding process killing logic directly in my scripts, but it doesn't work with Code Runner since the button has no effect when a process is already running - the code never executes. I know other VSCode extensions (especially AI-powered ones) can kill running processes, so this should be technically feasible. Having this as an optional setting would be a great improvement for development workflows that require frequent script restarts.

3C0D avatar Oct 17 '25 13:10 3C0D

  • killing process is easy to do
  • no clue about the exe file issue, will have to look into that other extension

ericchase avatar Oct 17 '25 13:10 ericchase