<ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: 10.11.4</li>
</ul>
<p dir="auto">Using mocha, es6 and chai with vs code does not debug properly.</p>
<ol dir="auto">
<li>Breakpoints in tests do not work properly, they may fire but in wrong place.</li>
<li>Value inspector does not show local variables defined using let</li>
<li>Debugging ES6 files, local variables do not show nor can you view values of function parameters.</li>
</ol>
<p dir="auto">Steps to Reproduce:</p>
<p dir="auto">See attached file.</p>
<p dir="auto">set breakpoint in calc.js.<br>
when breakpoint hits and you hover over it shows nothing.<br>
typing "value1" in the console states undefined.</p>
<p dir="auto">set breakpoint in test that will call the calc function, a breakpoint hits but not on breakpoint position.<br>
also can not see local values.<br>
<a href="https://github.com/Microsoft/vscode/files/234769/test.zip">test.zip</a></p>
<ul dir="auto">
<li>VSCode Version: 1.0.0</li>
<li>OS Version: Mac OS 10.11.3</li>
</ul>
<p dir="auto">Setup Steps:</p>
<ol dir="auto">
<li>Download and expand <a href="https://github.com/Microsoft/vscode/files/233815/NodeJsWithBabelDebuggingExample.ZIP">NodeJsWithBabelDebuggingExample.ZIP</a><br>
into a local folder.</li>
<li>Open the Terminal and point it to the folder from Step 1.</li>
<li>Run <code class="notranslate">npm install</code> (to install the Babel dependencies).</li>
<li>Run <code class="notranslate">npm start</code> (to demonstrate that the project is working Node program) which should produce a few lines of output and no errors.</li>
</ol>
<p dir="auto">Steps to Reproduce (on Mac OS):</p>
<ol dir="auto">
<li>In VS Code, open the folder created in the steps above.</li>
<li>Press F5 to start debugging the program.</li>
<li>Observe the debugger break at line 1 of ./index.js, which is a comment.  (This is the first sign of trouble.)</li>
<li>Repeatedly press F10 (to step) and observe the debugger break on various other lines of ./index.js that have nothing to do with the code being executed.</li>
</ol>
<p dir="auto">Apparently, the inline source map generated by Babel is either being missed, ignored, or misinterpreted.  It is also possible that the source map may be faulty, but seeing as a similar setup using other tools (such as Chrome Dev Tools) results in accurate debugging (and only when the source map is supplied) suggests that this is not the case.</p>
<p dir="auto">Btw, VS Code gives zero feedback (as far as I can see) as to whether a source map was found and/or is being used, making it almost impossible to diagnose this type of trouble.</p>
<p dir="auto">A few questions:</p>
<ol dir="auto">
<li>Have a done something wrong in this setup?  Is there something wrong or missing in my launch.json or package.json (where the Babel settings are)?</li>
<li>Are there some diagnostics that I can enable in VS Code to help determine what is going wrong?</li>
<li>Should I even expect to be able to successfully perform source-level debugging of dynamically-transpiled code with VS Code like this, or not?  (Other tools can do it, so I will be disappointed if this is not a supported use-case for VS Code.)</li>
</ol>
<p dir="auto">The VS Code web pages (<a href="https://code.visualstudio.com/docs/editor/debugging" rel="nofollow">https://code.visualstudio.com/docs/editor/debugging</a>) certainly make this sound like I should reasonably expect debugging to work:</p>
<blockquote>
<p dir="auto">Source maps can be generated with two kinds of inlining:</p>
<ul dir="auto">
<li>Inlined source maps: the generated JavaScript file contains the source map as a data URI at the end (instead of referencing the source map through a file URI).</li>
<li>Inlined source: the source map contains the original source (instead of referencing the source through a path).</li>
</ul>
<p dir="auto">VS Code supports both the inlined source maps and the inlined source.</p>
</blockquote>
<p dir="auto">As far as I know, setting <code class="notranslate">{ "sourceMaps": "inline" }</code> in the Babel configuration (which this project does via package.json) adheres to the first case ("inlined source maps") which the above quote from the VS Code web pages seems to suggest is supported.</p>
<p dir="auto">Thanks.</p>