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

Debugging via VS Code debugger #29

Open
alexmurari opened this issue Jul 6, 2022 · 1 comment
Open

Debugging via VS Code debugger #29

alexmurari opened this issue Jul 6, 2022 · 1 comment

Comments

@alexmurari
Copy link

Hey, @DanWahlin and @johnpapa!

I'm watching your course and really liking it!

My laptop screen ain't that big, and debugging via the browser dev tools is painful.

Is there a way to configure VS Code launch.json to start the webpack server and launch the browser with the debugger attached?

I've been trying to modify the webpack.config.js and launch.json with different settings, but it's not playing nice.

Thanks, guys.

@DanWahlin
Copy link
Owner

DanWahlin commented Jul 7, 2022

There should be a way to do that although I haven't personally tried for this particular scenario. I don't normally work with webpack and TypeScript directly (I'm always using TypeScript with with React, Angular, Node, etc.) and I typically use the Chrome or Edge DevTools. My go to for looking up examples is the VS Code recipes repo but they don't have something specific to this webpack scenario:

https://github.com/Microsoft/vscode-recipes

I played around quickly with calling an npm script (which you can do through a "command" in launch.json) but it would take some playing around with to get right it looks like since a build would need to occur to get the bundles on the hard-drive and then the webpack serve would need to run against those bundles. I (unfortunately) don't have a solution off the top of my head right now that I can point you to.

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

No branches or pull requests

2 participants