Issue 1:
VSCode Version: 1.0.0

OS Version: 10.11.4

Using mocha, es6 and chai with vs code does not debug properly.

Breakpoints in tests do not work properly, they may fire but in wrong place.

Value inspector does not show local variables defined using let

Debugging ES6 files, local variables do not show nor can you view values of function parameters.

Steps to Reproduce:

See attached file.

set breakpoint in calc.js.

when breakpoint hits and you hover over it shows nothing.

typing "value1" in the console states undefined.

set breakpoint in test that will call the calc function, a breakpoint hits but not on breakpoint position.

also can not see local values.

test.zip

Issue 2:
VSCode Version: 1.0.0

OS Version: Mac OS 10.11.3

Setup Steps:

Download and expand NodeJsWithBabelDebuggingExample.ZIP

into a local folder.

Open the Terminal and point it to the folder from Step 1.

Run npm install (to install the Babel dependencies).

Run npm start (to demonstrate that the project is working Node program) which should produce a few lines of output and no errors.

Steps to Reproduce (on Mac OS):

In VS Code, open the folder created in the steps above.

Press F5 to start debugging the program.

Observe the debugger break at line 1 of ./index.js, which is a comment. (This is the first sign of trouble.)

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.

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.

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.

A few questions:

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)?

Are there some diagnostics that I can enable in VS Code to help determine what is going wrong?

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.)

The VS Code web pages (https://code.visualstudio.com/docs/editor/debugging) certainly make this sound like I should reasonably expect debugging to work:

Source maps can be generated with two kinds of inlining:

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).

Inlined source: the source map contains the original source (instead of referencing the source through a path).

VS Code supports both the inlined source maps and the inlined source.

As far as I know, setting { "sourceMaps": "inline" } 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.

Thanks.