visual studio code - Run a command as if debugging, but without debugging - Stack Overflow

admin2025-04-22  0

VS Code has two ways of starting processes: Tasks and the "Run and Debug" panel.

I want to start two processes during development and there's nothing to debug because it's a Hugo site with an extra Tailwind process.

This works fine with tasks, but I like the "Run and Debug" panel a little better, as it's more geared to permanently running processes that are stopped together.

So I have this configuration:

{
  "version": "0.2.0",
  "compounds": [
    {
      "name": "Run Hugo & Tailwind",
      "configurations": ["hugo", "tailwind"]
    }
  ],
  "configurations": [
    {
      "name": "hugo",
      "type": "PowerShell",
      "request": "launch",
      "script": "${workspaceFolder}/hugo.ps1",
      "cwd": "${cwd}",
    },
    {
      "name": "tailwind",
      "type": "PowerShell",
      "request": "launch",
      "script": "${workspaceFolder}/tailwind.ps1",
      "cwd": "${cwd}",
    },
  ]
}

This sort of works, but there's a problem with the debugger (the PowerShell debugger) not being able to connect (an annoying window pops up). However, I don't want the PowerShell debugger anyway, I just want the processes to run.

Is there a dummy debug adapter that just runs a process, redirects stdout and does nothing else? Or some other way of using the "Run and Debug" panel?

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745284358a294298.html

最新回复(0)