Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable source-maps for better tests debugging #8

Open
Den-dp opened this issue Jul 26, 2016 · 2 comments
Open

Enable source-maps for better tests debugging #8

Den-dp opened this issue Jul 26, 2016 · 2 comments

Comments

@Den-dp
Copy link

Den-dp commented Jul 26, 2016

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

@mr47
Copy link
Owner

mr47 commented Jul 27, 2016

@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 mr47 added the question label Jul 27, 2016
@Den-dp
Copy link
Author

Den-dp commented Jul 27, 2016

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants