You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a few mocha tests that need to exercise some ES6 code which is normally targeted for the browser. I'm using babel through webpack to manage packaging this up on the fly using webpack-dev-server. In order to support running the tests in node I've opted to use the --compilers js:babel-core/register option with mocha to allow dynamic compiling of the ES5 tests and their imports. I've followed advice given for other related issues by trying to precompile the source, ensuring I have source maps enabled, and setting outDir as needed in the launch.json file but I'm still not getting good results. I've also made sure that my path doesn't contain any spaces. I've also tried various forms source maps (inline, both, true, ...). Eventually when letting the test run through an error is hit but error shows is a line that appears to be the transpiled code as opposed to the original source.
After various changes and a reboot things are looking much better all of the sudden. I'm also working on a separate group of tests so I'm unsure what may have jolted it into place. If I can narrow it down more I'll provide more details.
@weinand
First, I switched to VSCode recently and just love it, great work guys!
I'm having pretty similar problems with the latest vscode, the breakpoint just won't match for me.
I built a sample repo here to help you reproduce the issue.
Would be much appreciated if you can point me where I did wrong. It would be awesome to be able to setup the workflow this way.
I have a few mocha tests that need to exercise some ES6 code which is normally targeted for the browser. I'm using babel through webpack to manage packaging this up on the fly using webpack-dev-server. In order to support running the tests in node I've opted to use the
--compilers js:babel-core/register
option with mocha to allow dynamic compiling of the ES5 tests and their imports. I've followed advice given for other related issues by trying to precompile the source, ensuring I have source maps enabled, and settingoutDir
as needed in thelaunch.json
file but I'm still not getting good results. I've also made sure that my path doesn't contain any spaces. I've also tried various forms source maps (inline, both, true, ...). Eventually when letting the test run through an error is hit but error shows is a line that appears to be the transpiled code as opposed to the original source.My launch configuration:
Possibly related issues:
The text was updated successfully, but these errors were encountered: