title: VS Code start gdbserver
body: <p>I am trying to write a launch configuration for VS Code that can start <code>gdbserver</code> as a preLaunchTask.</p>
  <p>When I start debugging, everything just stalls when gdbserver says &quot;Listening on port XXXX&quot;</p>
  <p>I found many examples online of methods for other debuggers, but nothing specific for gdbserver.</p>
  <p>I have tried setting <code>isBackground</code> to <code>true</code> to no avail, along with trying to set up a <code>problemMatcher</code></p>
  <p>I couldn't find any documentation that seemed to explain how to write your own <code>problemMatcher</code> either.</p>
  <p>So, how do I write a task that can start gdbserver as part of a preLaunchTask for my debugger?</p>
  <p>Here is my task to start gdbserver</p>
  <pre><code>{
      &quot;label&quot;: &quot;run&quot;,
      &quot;type&quot;: &quot;shell&quot;,
      &quot;presentation&quot;: {
          &quot;echo&quot;: true,
          &quot;reveal&quot;: &quot;always&quot;,
          &quot;focus&quot;: false,
          &quot;panel&quot;: &quot;dedicated&quot;
          },
      &quot;options&quot;: {
          &quot;cwd&quot;: &quot;${workspaceRoot}/build&quot;
      },
      &quot;command&quot;: &quot;ssh&quot;,
      &quot;args&quot;: [
              &quot;root@remote&quot;,
              &quot;'gdbserver localhost:9091 program'&quot;
      ]     
  }
  </code></pre>
  <p>Here is my launch configuration</p>
  <pre><code>{
      &quot;name&quot;: &quot;Remote Debug&quot;,
      &quot;type&quot;: &quot;cppdbg&quot;,
      &quot;request&quot;: &quot;launch&quot;,
      &quot;program&quot;: &quot;${workspaceRoot}/build/program&quot;,
      &quot;args&quot;: [],
      &quot;stopAtEntry&quot;: false,
      &quot;cwd&quot;: &quot;${workspaceRoot}&quot;,
      &quot;environment&quot;: [],
      &quot;externalConsole&quot;: true,
      &quot;MIMode&quot;: &quot;gdb&quot;,
      &quot;setupCommands&quot;: [
          {
              &quot;description&quot;: &quot;Enable pretty-printing for gdb&quot;,
              &quot;text&quot;: &quot;-enable-pretty-printing&quot;,
              &quot;ignoreFailures&quot;: true
          }
      ],
      &quot;preLaunchTask&quot;: &quot;run&quot;,
      &quot;miDebuggerServerAddress&quot;: &quot;remote:9091&quot;,
      &quot;miDebuggerPath&quot;: &quot;aarch64-sbs-linux-gdb&quot;
  }
  ]
  </code></pre>