<p dir="auto">Software</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Version 0.10.6 (0.10.6) a80232bbcfe8a5cdad1ebc98638673d9dcb02458"><pre class="notranslate"><code class="notranslate">Version 0.10.6 (0.10.6) a80232bbcfe8a5cdad1ebc98638673d9dcb02458
</code></pre></div>
<p dir="auto">Code(In a definition file)</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Console2 {
    constructor(opt: IConsole2Opt);

    time(): this;
    date(): this;
    tag(...args: Array&lt;string|ITag&gt;): this;
    file(): this;
    f(): this;
    addLogger(name: string, colors?: string[]|string, opt?: ILoggerOpt): this;
    // TODO buildArgs(log)
    // TODO buildContext(log, opt)
    // TODO [your logger](*args)
  }"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-smi">Console2</span> <span class="pl-kos">{</span>
    <span class="pl-c1">constructor</span><span class="pl-kos">(</span><span class="pl-s1">opt</span>: <span class="pl-smi">IConsole2Opt</span><span class="pl-kos">)</span><span class="pl-kos">;</span>

    <span class="pl-c1">time</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c1">date</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c1">tag</span><span class="pl-kos">(</span>...<span class="pl-s1">args</span>: <span class="pl-smi">Array</span><span class="pl-kos">&lt;</span><span class="pl-smi">string</span><span class="pl-c1">|</span><span class="pl-smi">ITag</span><span class="pl-kos">&gt;</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c1">file</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c1">f</span><span class="pl-kos">(</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c1">addLogger</span><span class="pl-kos">(</span><span class="pl-s1">name</span>: <span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">colors</span>?: <span class="pl-smi">string</span><span class="pl-kos">[</span><span class="pl-kos">]</span><span class="pl-c1">|</span><span class="pl-smi">string</span><span class="pl-kos">,</span> <span class="pl-s1">opt</span>?: <span class="pl-smi">ILoggerOpt</span><span class="pl-kos">)</span>: this<span class="pl-kos">;</span>
    <span class="pl-c">// TODO buildArgs(log)</span>
    <span class="pl-c">// TODO buildContext(log, opt)</span>
    <span class="pl-c">// TODO [your logger](*args)</span>
  <span class="pl-kos">}</span></pre></div>
<p dir="auto">This copy of code can compile with the newest TypeScript compiler (<code class="notranslate">message TS6029: Version 1.7.5</code>) but in Visual Studio Code it raises an error <code class="notranslate">Duplicate identifier 'this'.</code></p>
<p dir="auto">According to <a href="https://blogs.msdn.microsoft.com/typescript/2015/11/30/announcing-typescript-1-7/" rel="nofollow">Announcing TypeScript 1.7</a>, such code should compile with the TypeScript compiler without raising errors. But Visual Studio Code raised errors.</p>
<ul dir="auto">
<li>Clone <a href="https://github.com/Pure-D/code-d">https://github.com/Pure-D/code-d</a> and checkout commit 09ce158566e94bd28cfba9a9fd1365717fa863fd.</li>
<li>Open that workspace in Code.</li>
<li>Open <code class="notranslate">launch.json</code> and change the <code class="notranslate">outDir</code> values to use <code class="notranslate">${workspaceRoot}</code></li>
<li>Hit F5</li>
</ul>
<p dir="auto">You get this error:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/13458948/a82dc270-e070-11e5-8aeb-05a4079aefba.png"><img src="https://cloud.githubusercontent.com/assets/22350/13458948/a82dc270-e070-11e5-8aeb-05a4079aefba.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Open the task log and you'll see this:</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/13458956/b72a2746-e070-11e5-8029-bc9a4c3fd8c7.png"><img src="https://cloud.githubusercontent.com/assets/22350/13458956/b72a2746-e070-11e5-8029-bc9a4c3fd8c7.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">Meaning that the <code class="notranslate">npm</code> task failed to execute.</p>
<p dir="auto">When I run that task in the terminal, I can confirm that it returns a non-zero value. So why isn't Debug picking that up and informing me that the problem occurred in the task itself?</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/22350/13458970/ce0f880c-e070-11e5-954b-ab53c78c25f9.png"><img src="https://cloud.githubusercontent.com/assets/22350/13458970/ce0f880c-e070-11e5-954b-ab53c78c25f9.png" alt="image" style="max-width: 100%;"></a></p>