4 ms·
I'm used to being able to run my program via command-R or some other key equivalent. I haven't been able to find a way to do this conveniently from VSCode. How
by ridiculous_fish 10y ago
I'm used to being able to run my program via command-R or some other key equivalent. I haven't been able to find a way to do this conveniently from VSCode. How do other VSCode users run their programs?
- tonyedgecombe 10y agoF5 is the default but you can set your own keyboard shortcuts from the File->Preferences->Keyboard Shortcuts menu
- ridiculous_fish 10y agoThere appears to be no way to bind a keyboard shortcut for running an arbitrary task. https://github.com/Microsoft/vscode/issues/6550 https://github.com/Microsoft/vscode/issues/6550 By default F5 is "continue debugging," but debugging is limited to Node, so I don't think that's what I want. Incidentally my MBP has no F5 key :)
- WorldMaker 10y agoThere are debugging extensions for environments beyond Node. Also, Ctrl+Shift+B is the default shortcut for whatever arbitrary task you have set as your Build Task in .vscode/tasks.json.
- xwvvvvwx 10y agoThere are debug adapters for tons of languages available through extensions. I use the C++ and Python debuggers regularly and love them :)
- WorldMaker 10y agoThe Tasks system in VSCode is quite powerful: https://code.visualstudio.com/Docs/editor/tasks https://code.visualstudio.com/Docs/editor/tasks Also, the integrated Terminal (Ctrl+`) is more useful with each version.
- ridiculous_fish 10y agoHow do you (personally) use tasks? Do you bind a key to the "Run Task" command and then type the task name in? Doesn't that feel inefficient? I'm just trying to get the edit/build/run cycle down. So far the "run" part is missing for me.
- WorldMaker 10y agoIt varies on the language/project. I tend to set my Build Task (Ctrl+Shift+B) to the most useful task and F1 > Run task my way to the others. That doesn't feel much more inefficient than switching to an external terminal (though as the internal terminal with Ctrl+` gets better I may start using it more often). The F5 debug support is great in Node and .NET Core and there are extensions to support other language debugging. (I've heard the Go and Rust ones in particular are great, though I don't work in either language myself.)
- kwood 10y agoApart from the built in task runner system, you can always use an extension that does a "classic" command-R. I use https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner https://marketplace.visualstudio.com/items?itemName=formulah... and bound it to exactly this key.