title: How to make vscode not wait for finishing a preLaunchTask?
body: <p>I have a debug setup in Visual Studio code where I run an external binary which can execute my JS files (using duktape). The debug adapter currently only supports attach requests (not launch) so I have to run the binary before I can debug the JS scripts.</p>
  
  <p>In order to avoid having to start the application manually I created a task for it and set that in my launch.json file:</p>
  
  
  
  <pre class="lang-json prettyprint-override"><code>{
      "version": "0.2.0",
      "configurations": [{
          "name": "Attach MGA",
          "type": "duk",
          "preLaunchTask": "debug mga",
          "request": "attach",
  
          "address": "localhost",
          "port": 9091,
  
          "localRoot": "${workspaceRoot}",
  
          "stopOnEntry": false,
          "debugLog": true
      }]
  }
  </code></pre>
  
  <p>The task is defined so:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
      "version": "0.1.0",
      "command": "&lt;absolute path to&gt;/mga",
      "isShellCommand": false,
      "showOutput": "always",
      "suppressTaskName": true,
      "tasks": [{
          "taskName": "debug mga",
          "args": ["--debugger", "main.json"]
      }]
  }
  </code></pre>
  
  <p>The problem is now that vscode waits for the pre launch task to finish, while the application waits for a debugger to attach. Catch 22.</p>
  
  <p>How can I avoid that vscode waits for the pre launch task to finish?</p>
  
  <p><strong>Update</strong>:</p>
  
  <p>Meanwhile I have read up on <a href="https://code.visualstudio.com/docs/editor/tasks" rel="noreferrer">the vscode task page</a> and came up with this task configuration. Still, it doesn't work for me</p>
  
  <pre class="lang-json prettyprint-override"><code>{
      "version": "2.0.0",
      "tasks": [
          {
              "label": "launch-mga",
              "type": "shell",
              "command": "&lt;absolute path to&gt;/mga",
              "args": [
                  "config/main.json",
                  "--debugger"
              ],
              "isBackground": true,
              "problemMatcher": {
                  "owner": "custom",
                  "pattern": {
                      "regexp": "_____"
                  },
                  "background": {
                      "activeOnStart": true,
                      "beginsPattern": "^.*Waiting for debug connection.*$",
                      "endsPattern": "^.*blah.*$"
                  },
              },
          }
      ]
  }
  </code></pre>
  
  <p>The launched application prints the wait message and then waits endlessly for a debug connection. Maybe the problem has to do with the application (which is kinda Node.js like terminal app), written in C++?</p>