Skip to content

Instantly share code, notes, and snippets.

@prabindh
Last active June 24, 2021 12:24
Show Gist options
  • Select an option

  • Save prabindh/82d701a5e54330ea546b82cd8bd3bb91 to your computer and use it in GitHub Desktop.

Select an option

Save prabindh/82d701a5e54330ea546b82cd8bd3bb91 to your computer and use it in GitHub Desktop.

Revisions

  1. prabindh revised this gist Jun 24, 2021. 1 changed file with 26 additions and 1 deletion.
    27 changes: 26 additions & 1 deletion visual-studio-code-conda.sh
    Original file line number Diff line number Diff line change
    @@ -5,4 +5,29 @@ Debugging with vscode and conda python:

    - Close vscode
    -- open conda prompt, activate required environment via conda activate myEnv
    - launch vscode from the command prompt, using "code"
    - launch vscode from the command prompt, using "code"


    Place this in settings.json
    {
    "python.pythonPath": "C:\\Users\\xxc\\anaconda3\\envs\\deep\\python.exe",
    "python.terminal.activateEnvironment": true,
    "terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe"
    }

    launch.json
    {
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
    {
    "name": "Python: Current File",
    "type": "python",
    "request": "launch",
    "program": "${file}",
    "console": "integratedTerminal",
    }
    ]
    }
  2. prabindh created this gist Jun 22, 2021.
    8 changes: 8 additions & 0 deletions visual-studio-code-conda.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    Debugging with vscode and conda python:
    - Install vs code
    - Follow https://medium.com/analytics-vidhya/efficient-way-to-activate-conda-in-vscode-ef21c4c231f2 to add conda terminal to vs code via launch.json. Args have to be added like
    "args": ["--aa=2", "--ab=1", "--sm", "--input=asd.img"]

    - Close vscode
    -- open conda prompt, activate required environment via conda activate myEnv
    - launch vscode from the command prompt, using "code"