opensource-kit icon indicating copy to clipboard operation
opensource-kit copied to clipboard

Enable source-maps for better tests debugging

Open Den-dp opened this issue 9 years ago • 2 comments

Imagine the case when developer wants to debug his library and tests within browser and chrome dev tools.

So… is there a way to enable source-maps for tests and source code?

For now it looks like this chrome_2016-07-27_01-31-22

Den-dp avatar Jul 26 '16 22:07 Den-dp

@Den-dp i am working on a new version with webpack 2.0, to enable source-maps you need add to webpack.karma.js

...
module.exports = {
    ...
    devtool: "source-map", // about webpack dev tools you can read on https://webpack.github.io/docs/configuration.html 
    ...
};
...

Thanks.

mr47 avatar Jul 27 '16 05:07 mr47

@mr47 devtool: "source-map", right.

The problem is with current setup this option (devtool: "source-map") will not work at all.

(Look for 404 in console) image

Actually even devtool: "inline-source-map" will not work as well, becuase of code-coverage thing

image

In general, I think that sourcemaps for debugging are a must have feature which should be available out of the box for such project as opensource-kit.

So, if it all makes sense for you then we may label this issue as feature request/enhancement. Who knows, maybe with webpack2 things will go smoother.

Thnaks

Den-dp avatar Jul 27 '16 12:07 Den-dp