A friend of mine asked me an interesting question Friday that I thought I should share. Where did Webpack put my source code? When we build Angular 2 apps using the Angular CLI, Webpack comes pre-configured. So, we don’t exactly know where it is putting things.
- Open your app in Chrome’s debugger
- Click on the source tab
- Click the disclosure arrow next to the word “Top”, if it is not already opened
- Click the arrow next to “webpack://” (pic #1)
- Click the arrow next to the path to you app
(For me it is “Users/troymiles/Documents/Tutorials/quizzer”)
- Click on the “.ts” file you’d like to debug, break points can be set in it (pic #2)