My Latest VSCode Setup

My development environment is always evolving. Here's my latest/greatest setup.


by flipperpa on Aug. 1, 2020, 3:48 p.m.

Python Django How-To

Video on My Path to VSCode

I've used a lot of editors over the years. Here's a presentation for co-workers on how I ended up a VSCode enthusiast. If you'd like to learn why I love VSCode so much, check this out.

Current Extensions

An Example ".vscode/settings.json"

{
    "[python]": {
        "editor.rulers": [
            88
        ],
        "editor.formatOnSave": false,
    },
    "python.pythonPath": "/home/username/.venvs/your-venv/bin/python3",
    "python.formatting.provider": "black",
    "python.linting.enabled": true,
    "python.linting.pylintEnabled": false,
    "python.linting.flake8Enabled": true,
    "python.linting.flake8Args": [
        "--ignore=E203,E231,E309,E501,W503",
        "--max-line-length=88",
        "--verbose"
    ],
    "editor.wordWrapColumn": 88,
    "files.associations": {
        "**/*.html": "html",
        "**/templates/**/*.html": "django-html",
        "**/templates/**/*": "django-txt",
        "**/requirements{/**,*}.{txt,in}": "pip-requirements"
    },
}

An Example ".vscode/launch.json"

You can find details about creating a debugger launch profile here; below is an example of the one I use.

{
    // 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: Django",
            "type": "python",
            "request": "launch",
            "program": "${workspaceFolder}/manage.py",
            "args": [
                "runserver",
                "0:8000",
            ],
            "django": true
        }
    ]
}

Fin.

I hope this helps get you off any running with VSCode for your Python and Django development!