skip to Main Content

I do most of my development via VS Code on my local machine. Whenever I open the editor I manually run a bash script (in the integrated terminal) that does the following things:

  1. Starts a local instances of several webapp with hot-reload enabled
  2. Starts the Dagster UI via Dagit
  3. Starts the ML Flow UI
  4. Starts a Tensorboard server
    etc…

I sometimes forget to run the bash script, which causes the occasional frustration when I have to re-run things or interrupt my work for this.

The most expedient way to fix it that comes to mind is to set things up so the .sh script runs whenever VS Code is opened.

Any ideas if this is possible? Maybe via an extension?

2

Answers


  1. No extension needed, try to adapt following .vscode/tasks.json

    {
        "version": "2.0.0", 
        "presentation": { "echo": false },
        "tasks": [
            { "label": "First", "type": "shell", "command": "echo Run whatever scripts needed here; exec bash", "runOptions": { "runOn": "folderOpen" } }
        ]   
    }
    
    Login or Signup to reply.
  2. VS Code have tasks support, like Grunt/Gulp/etc, which include running arbitrary shell scripts. You can run pretty much anything you want and you can find out more in the official documentation

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search