You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/contribute/debugging.mdx
+4-18Lines changed: 4 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ related:
19
19
When contributing to the core repo, writing a loader/plugin, or even working on a complex project, debugging tools can be central to your workflow. Whether the problem is slow performance on a large project or an unhelpful traceback, the following utilities can make figuring it out less painful.
20
20
21
21
- The [`stats` data](/api/stats) made available through [Node](/api/node/#stats-object) and the [CLI](/api/cli/#common-options).
22
-
- Chrome **DevTools**via `node-nightly`and the latest Node.js versions.
22
+
- Chrome **DevTools** and the latest Node.js version.
23
23
24
24
## Stats
25
25
@@ -38,26 +38,12 @@ On top of that, the official [analyze tool](https://github.com/webpack/analyse)
38
38
39
39
While [`console`](https://nodejs.org/api/console.html) statements may work well in straightforward scenarios, sometimes a more robust solution is needed. As most front-end developers already know, Chrome DevTools are a life saver when debugging web applications, _but they don’t have to stop there_. As of Node v6.3.0+, developers can use the built-in `--inspect` flag to debug a node program in DevTools.
40
40
41
-
This gives you the power to easily create breakpoints, debug memory usage, expose and examine objects in the console, and much more. In this short demo, we'll utilize the [`node-nightly`](https://github.com/hemanth/node-nightly) package which provides access to the latest and greatest inspecting capabilities.
41
+
Let's start by invoking webpack with the `node --inspect`.
42
42
43
-
W> The `--inspect` interface has been available since v6.3.0 so feel free to try it out with your local version, but be warned that certain features and flags may differ from the ones in this demo.
44
-
45
-
Let's start by installing it globally:
46
-
47
-
```bash
48
-
npm install --global node-nightly
49
-
```
50
-
51
-
Now, we'll need to run it once to finish the installation:
52
-
53
-
```bash
54
-
node-nightly
55
-
```
56
-
57
-
Now, we can use `node-nightly` along with the `--inspect` flag to start our build in any webpack-based project. Note that we cannot run NPM `scripts`, e.g. `npm run build`, so we'll have to specify the full `node_modules` path:
43
+
Note that we cannot run npm `scripts`, e.g. `npm run build`, so we'll have to specify the full `node_modules` path:
0 commit comments