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

Contribute - Debugging with V8 Inspector #90

Closed
bebraw opened this issue Sep 2, 2016 · 6 comments
Closed

Contribute - Debugging with V8 Inspector #90

bebraw opened this issue Sep 2, 2016 · 6 comments

Comments

@bebraw
Copy link
Contributor

bebraw commented Sep 2, 2016

I'm submitting a feature request

Webpack version:
1.10.x/2.x

Current behavior:
We don't have any documentation on how to use the new node-nightly --inspect --debug-brk feature with webpack. There are a few little details to implement so it is worth having documentation on it.

Expected/desired behavior:
Having a small section in documentation explaining how to leverage the power of node-nightly which contains the --inspect flag letting you use the full chrome dev tools to profile, find memory leaks, and debug your webpack builds.

  • What is the motivation / use case for changing the behavior?
    There are small leaky abstractions from miss use of certain webpack features. Mine being one of them. A useful profiler that people are familiar with like ChromeDevTools can be invaluable

Moved from webpack/webpack#2724 .

@pksjce
Copy link

pksjce commented Dec 1, 2016

@bebraw - So, now in node 7 this is available. I have used

node --inspect=8888 --debug-brk ./node_modules/.bin/webpack

But, I don't understand what I could profile and how it could be useful to me?

@bebraw
Copy link
Contributor Author

bebraw commented Dec 1, 2016

@TheLarkInn Any thoughts on this?

@TheLarkInn
Copy link
Member

Yeah so when builds are slow you can use the profile tab and record to find out what functions are taking up the most time from there. Should allow you to diagnose long running our use heap snapshots to capture memory allocations and see where leaks might be occurring.

hzuhyb pushed a commit to hzuhyb/webpack.js.org that referenced this issue Jan 24, 2017
@skipjack skipjack changed the title How to - Debugging with V8 Inspector Guides - Debugging with V8 Inspector Apr 29, 2017
@skipjack
Copy link
Collaborator

@TheLarkInn should we just port this article you wrote to a guide?

@skipjack
Copy link
Collaborator

I may try to pick this up. Been working with node scripts more recently so I'd be interested to read through @TheLarkInn's article and flesh it out into a guide/article. I think it might actually fit in the Development or Contribute section better though.

That said, if anyone else finds this and wants to pick it up, just ping me and we can figure something out (i.e. I'm fine with passing it along as well).

@skipjack skipjack changed the title Guides - Debugging with V8 Inspector Contribute - Debugging with V8 Inspector Oct 17, 2017
@skipjack
Copy link
Collaborator

I do think this makes more sense in the new Contribute section. Will start working on a PR soon.

skipjack added a commit that referenced this issue Oct 24, 2017
Add a debugging guide that contains information on using stats data and 
debugging webpack via Chrome's DevTools (#90). This should be a good 
home for any other common debugging tips and tricks.

Resolves #90
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

4 participants