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

Source mapping of server code is not working when debugging in Chrome Dev tools #319

Open
gontard opened this issue Nov 3, 2016 · 3 comments

Comments

@gontard
Copy link

gontard commented Nov 3, 2016

Hello and thanks for this tool, it's a huge time-saver.

I use kyt 0.3.0, node 6.7.0 on MacOS Sierra and I want to debug my server code.

I use the dev command with the inspect flag.

kyt dev -- --inspect

and then i open the Chrome Dev Tools using the url printed in the terminal:

Debugger listening on port 9229.
Warning: This is an experimental feature and could change at any time.
To start debugging, open the following URL in Chrome:
    chrome-devtools://devtools/remote/serve_file/@60cd6e859b9f557d2312f5bf532f6aec5f284980/inspector.html?experiments=true&v8only=true&ws=localhost:9229/node

And it works perfectly except the source mapping for my server code. Only, the node_modules are mapped:
capture d ecran 2016-11-02 a 15 06 21

Any ideas ?

@delambo
Copy link
Member

delambo commented Nov 4, 2016

Thanks for creating this @gontard. I quickly looked into this and got the same result. I tried using "source-map" instead of "inline-source-map" but that didn't seem to fix it.

Anyone have any ideas?

@julianvmodesto
Copy link
Contributor

I just saw this blogpost today: http://erikaybar.name/webpack-source-maps-in-chrome/

I'll fiddle around with the settings and see if this works.

@julianvmodesto
Copy link
Contributor

julianvmodesto commented Jan 30, 2017

Hm, on first look, it looks like my source maps are actually working already in dev + production in Chrome DevTools, so it seems like devtool: 'source-map' is set by default. I did try devtool: 'eval-source-map' for development, and this seemed to work out and produce source maps usable in Chrome, too. Could use some info on reproducing this... I see correct file names + paths in console.log statements, and under sources I see weback://, where my src files are.

@delambo delambo removed the 0.4.0ish label Feb 13, 2017
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

3 participants