Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
S

Steven_Clarke

@Steven_Clarke
About
Posts
3
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Anyone using VS Code?
    S Steven_Clarke

    Sorry, didn't mean to make your head hurt :-) Give the extension a try. It is simple to setup and not only does it allow you to run your Python code from inside VS Code it allows you to debug the code too. You can place breakpoints, step through the code, inspect variables etc. VS Code is a rich code editor that aims to support all sorts of different languages and runtimes. So there is going to be a little bit of configuration required to get it to do exactly what you want with a specific language and runtime. We're always looking for ways to make this easier though.

    The Lounge visual-studio com beta-testing question announcement

  • Anyone using VS Code?
    S Steven_Clarke

    Hi, Right out of the box, VS Code doesn't know how to run Python programs. There are two ways to tell it how to do so though. First, you can install a Python extension. We have some documentation that describes how to do this: Python documentation [^] Alternatively, you can set up a task to run the currently opened file. We have documentation on tasks here: Tasks in visual Studio Code[^] To set up a task, press Ctrl-Shift-B. If you don't have any tasks defined, VS Code will show a message box saying that no task runner has been configured. Click the button at the right hand side of the message box to configure a task runner. You'll see a drop down offering a list of different task runners. Choose the 'Others' option at the bottom. This will generate a file in the .vscode folder that shows how to configure VS Code to run an external program (e.g., python.exe). You can modify the example that is generated for you to look like this:

    {
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "0.1.0",
    "command": "python",
    "isShellCommand": true,
    "args": ["${file}"],
    "showOutput": "always"
    }

    This tells VS Code to run the python command (make sure your environment is set up to find python.exe in your path, otherwise specify the full path to python.exe as the value for the command field). The args attribute specifies that the current open file should be passed as an argument to the python command. Save any changes you make to this file, open the python file you want to run then press Ctrl-Shift-B. This will run the task you just specified on the currently open file. If this all works properly you should see the output from your python program in the Output window. In this example I've given above, the task assumes that the executable it launches won't seek any input from the user on the command line. There is a workaround for this posted here: Running python script in Visual Studio Code; how to get `input ()` to work? - Stack Overflow[

    The Lounge visual-studio com beta-testing question announcement

  • Anyone using VS Code?
    S Steven_Clarke

    I'm really interested in what you found klunky about VS Code. I'm on the VS Code team and we are working on removing adoption blockers. If you can spare the time to describe what put you off the product, we'd really appreciate it. Then we can work on it and improve the experience. Thanks, Steven

    The Lounge visual-studio com beta-testing question announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups