Is There Any Keyboard Shortcut To Run Code From Visual Studio Code?
Có thể bạn quan tâm
- View Active Threads
- View Today's Posts
- Home
- Forums
- View New Posts
- View Today's Posts
- My Discussions
- Unanswered Posts
- Unread Posts
- Active Threads
- Mark all forums read
- Staff List
- Member List
- Help
- Calendar
- Search
- Statistics
- Interpreter
- IRC
Is there any keyboard shortcut to run code from Visual Studio Code?
- Python Forum
- Forum & Off Topic
- Bar
- 0 Vote(s) - 0 Average
- 1
- 2
- 3
- 4
- 5
| Thread Modes Is there any keyboard shortcut to run code from Visual Studio Code? |
python300 Silly Frenchman Posts: 24 Threads: 8 Joined: Jun 2017 Reputation: 1 #1 Jun-04-2018, 07:33 PM (This post was last modified: Jun-04-2018, 07:46 PM by python300.) I know you can right click in the editor and select Run Python File in Terminal. Or I can right click the name of the python file from left panel and select Run Python File in Terminal. But what i am trying to find is if there is a keyboard shortcut to run the code? My bad. I was missing code runner extension and so was unable to see the Run triangle symbol at the top of code editor. Once I installed Code Runner, I can see the Run Code symbol (triangle) and om highlighting it, I see the shortcut Ctrl + Alt + N Reply Find Reply python300 Silly Frenchman Posts: 24 Threads: 8 Joined: Jun 2017 Reputation: 1 #2 Jun-04-2018, 09:39 PM (This post was last modified: Jun-04-2018, 09:39 PM by python300.) I have installed Visual Studio Code and added extensions - Python, Code Runner. With Code Runner, now I can see the Run Code symbol (triangle) and on highlighting it, I see the shortcut Ctrl + Alt + N But when I try to use it to run the code that asks for user input, I can't find a way to provide the input. When I try to enter user input, I get error message "Cannot edit in read-only editor" I think this is because I am missing some configuration part for Code Runner like setting up PATH or some other Workspace settings. Please assist me in identifying what all configuration will I need to do and how? [UPDATE]: I did select "Add Python 3.6 to PATH" while installing Python. I have attached screenshots for reference. Posts: 7,398 Threads: 123 Joined: Sep 2016 Reputation: 511 #3 Jun-04-2018, 11:35 PM Install Code Runner,get a button and shortcut Ctrl+Alt+N. Can also build own task that run Python. Reply Find Reply python300 Silly Frenchman Posts: 24 Threads: 8 Joined: Jun 2017 Reputation: 1 #4 Aug-07-2018, 09:12 PM Finally I got answer to my second question (which I wanted to post as a new question) from SO. Answer: You can provide input by telling code runner to use the terminal. To do this, there is a setting called code-runner.runInTerminal, set to false by default, that you can set to true. In the lower left hand corner of the screen on "VS code" you'll see the icon which will take you to settings when clicked. Thank you to the helper who answered it there. I wanted to post that answer here so if someone like me comes here searching for the same thing, he/she will find help here. Reply Find Reply |
| Possibly Related Threads… | |||||
| Thread | Author | Replies | Views | Last Post | |
| Autocompletion for Python in Visual Studio | user3481 | 1 | 3,223 | Dec-10-2020, 12:03 PM Last Post: snippsat | |
| Installing the Visual Studio Code on Linux - how to do that!? | apollo | 4 | 5,897 | Oct-05-2019, 09:48 PM Last Post: apollo | |
- View a Printable Version
User Panel Messages
Announcements
Announcement #1 8/1/2020 Announcement #2 8/2/2020 Announcement #3 8/6/2020
Login to Python Forum
Enter your details to login to your account: Remember me Lost Password? Login Don't have an account yet? Sign Up! Linear ModeThreaded ModeTừ khóa » Visual Studio Code Run Python Shortcut
-
How To Execute Python Code From Within Visual Studio Code
-
Python In Visual Studio Code
-
VsCode Keyboard Shortcut To Run Python In The Terminal - Jason Murray
-
Setup Visual Studio Code Python Run Keyboard Shortcut - YouTube
-
What Is The Keyboard Shortcut To Run Selected Python Code In Visual ...
-
How To Run Code In VS Code - Alphr
-
How To Get Started With Python In Visual Studio Code - DigitalOcean
-
User Keyboard Shortcut For 'Run Selection/Line In Python Terminal ...
-
Python Support In Visual Studio On Windows | Microsoft Docs
-
What Is The Keyboard Shortcut In VS Code To Run A Python File? - Reddit
-
Shortcut Key To Run Python Program In Vs Code
-
Python With Visual Studio Code On MacOS - Medium
-
Advanced Visual Studio Code For Python Developers
-
How To Stop Execution Of Python Script In Visual Studio Code