最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin8浏览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?

发布评论

评论列表(0)

  1. 暂无评论