Welcome to TWIL, your weekly dose of micro-learning from the tech trenches at Cuttlesoft! In this post, Frank untangles the intricacies of setting up Multiple Configs for the VS Code Debugger, essential for efficiently managing complex project components like Django and Celery in your development environment. Discover Frank's tips for the ideal VSCode setup, allowing you to simultaneously debug different processes with ease—a true game-changer for developers looking for a streamlined workflow. Dive into this week's learning and elevate your debugging skills with precision!

Define Multiple Configs for VS Code Debugger

Define multiple process configs in launch.json so you can debug several components of a project's stack (e.g. django and celery)

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "[django] runserver",
      "type": "python",
      "request": "launch",
      "program": "${workspaceFolder}/manage.py",
      "args": ["runserver"],
      "django": true,
      "justMyCode": false
    },
    {
      "name": "[celery] worker",
      "type": "python",
      "request": "launch",
      "module": "celery",
      "console": "integratedTerminal",
      "args": ["-A", "myapp", "worker", "-l", "debug", "-E"]
    }
  ]
}

Note the [celery] worker defines a process to run in the VS Code terminal which makes it a better stating place for arbitrary shell commands.

  • VS Code
Frank Valcarcel's profile picture
Frank Valcarcel

Cofounder, Director of Operations

Related Posts

August 18, 2024 • Frank Valcarcel

What makes Enterprise Software Development Different?

Enterprise software powers large organizations, handling complex tasks across departments. From robust security to scalability, these solutions face unique challenges. Explore what makes software “enterprise-ready” and how to choose the right development approach for your business.

Image for 'This Week I Learned' blog post featuring tips on managing Git branches including renaming and syncing with remote changes.
October 8, 2019 • Frank Valcarcel

TWIL 2019-10-04

Join us for ‘TWIL,’ where Emily shares innovative Git tips for managing branches with rewritten history. Learn to sync local branches with remote changes and rename them effectively.