Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →To debug a Node.js application, reproduce the problem, start Node with the built-in V8 Inspector, connect a debugging client, and pause execution near the suspected cause. Use --inspect for a running process, --inspect-wait when startup must wait for a client, or --inspect-brk to pause at the first line after a client attaches. Chrome DevTools, Microsoft Edge, VS Code, other IDEs, and Node’s terminal debugger can all connect.
How to prepare a useful debugging session
A debugger is most useful when you can reliably reach the behavior you want to inspect. First reduce the problem to a small repeatable case where possible. Record the command you run, the Node.js version, the relevant inputs, what you expected, and what actually happened. This makes it easier to tell whether a change fixed the cause or merely changed the symptom.
Keep tests and logging in the workflow: a debugger lets you inspect one execution path in detail, but does not replace repeatable checks. Before starting the process, identify the likely function, branch, or input boundary where the behavior diverges. That gives you a sensible place to set the first breakpoint.
Choose when Node.js should pause
Node.js enables the V8 Inspector with startup flags. The choice is about whether your program should begin executing before you connect. The flags below are documented in the Node.js v26.10.0 debugger reference; check the reference for the Node.js version installed in your environment.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errors#1 Best Overall
| Flag | Startup behavior | Use it when |
|---|---|---|
--inspect |
Starts the program immediately with the Inspector enabled. | You can attach after startup and the code of interest will run again, or you do not need to inspect the earliest startup work. |
--inspect-wait |
Waits for a debugger client to connect before proceeding. | Startup must not continue until you have attached. |
--inspect-brk |
Pauses at the first line when a debugger client attaches. | You need to step through startup from the beginning. |
For example, add the chosen flag before your entry-point script:
node --inspect app.js
node --inspect-wait app.js
node --inspect-brk app.js
With plain --inspect, the process may already have passed the relevant code by the time a client connects. If the bug occurs only during initialization, choose a wait or break flag instead. The Inspector’s documented default endpoint is 127.0.0.1:9229; each process has a unique UUID associated with its Inspector endpoint.
Connect Chrome DevTools to Node.js
Chrome DevTools is a graphical option for setting breakpoints, stepping through code, and examining runtime state. The Node.js guide also documents Microsoft Edge’s equivalent inspection page.
Rank #2
- Start the application with the appropriate Inspector flag.
- In Chrome, open
chrome://inspect. In Edge, openedge://inspect. - If needed, open the configuration control and add the target host and port. For a local process using the default endpoint, use
localhost:9229. - Under Remote Target, find the Node.js process and choose its inspect link to open DevTools.
- Open the relevant source file in DevTools and set a breakpoint where you expect the behavior to diverge.
The exact client interface can change independently of Node.js. The Node.js guide lists Chrome DevTools 55+ and Microsoft Edge among supported client paths; consult the current browser instructions if labels differ.
Use VS Code or another IDE
If you already work in VS Code, its Debug panel and a Node.js launch configuration provide an integrated way to start and debug an application. Begin in the Debug panel, choose the Node.js launch configuration, and set the program entry point and any required arguments or environment. Start the debug session and place breakpoints in the source editor.
The Node.js guide also lists Visual Studio, WebStorm and other JetBrains IDEs, and Eclipse as Inspector clients. These options are useful when they fit your existing editor workflow; the official guide lists clients and connection paths but does not rank them or establish comparative performance. For a quick attach from a browser, use Chrome or Edge; for a terminal-first workflow, use node inspect.
Rank #3
Inspect the point where behavior changes
Once execution stops at a breakpoint, examine the values and call path before changing code. A practical sequence is:
- Set a breakpoint on the suspected statement or branch.
- Continue or restart the application and supply the input that reproduces the issue.
- When execution pauses, inspect local variables and relevant expressions. Compare the actual values with the inputs and conditions you recorded.
- Read the call stack to see how execution reached this function and which callers supplied its arguments.
- Step over a line to execute it without entering called functions; step into a call when its internals matter; step out when you have enough information about the current function.
- Adjust the breakpoint or condition and repeat until you can identify the point at which actual behavior first diverges from expected behavior.
For a failure that occurs only for a particular value, use a conditional breakpoint so execution pauses only when its condition is true. This avoids repeatedly stopping on irrelevant calls. Keep the condition specific to the state you are trying to examine, and remove or disable temporary breakpoints when the investigation is finished.
Debug from the terminal with node inspect
The built-in CLI debugger is an option when you prefer not to open a graphical client. Start it with the entry-point script:
Rank #4
node inspect app.js
At its prompt, use the debugger’s help to see commands supported by your installed Node.js version. The reference documents interactive breakpoints, conditional breakpoints, backtraces, expression evaluation, watches, CPU profiles, and heap snapshots. This is a useful route for terminal-based inspection; it is separate from the deprecated legacy --debug workflow, which Node.js says was deprecated in version 7.7.0.
Use probe mode only for targeted capture
The Node.js v26.10.0 debugger reference documents node inspect --probe for non-interactive expression capture at source locations. It is a specialized option rather than the default path for interactive debugging: the reference labels probe mode experimental, says it was added in v26.1.0, and notes that it launches a new process from the entry-point script.
Because it is experimental and version-sensitive, consult the debugger reference matching your installed Node.js release before relying on probe mode. For an interactive investigation, ordinary breakpoints and stepping remain the clearer starting point.
Keep the Inspector private
The Inspector is a privileged interface, not a harmless status endpoint. Node.js warns that a client able to connect may execute arbitrary code with the privileges of the Node.js process. The Node.js debugging guide cautions that binding the Inspector to a public IP address or 0.0.0.0 can allow reachable clients to connect without restriction. It also notes that local applications can access the default loopback Inspector, so local access is not a boundary between mutually untrusted programs.
For remote debugging, do not expose the Inspector port to the public internet. Keep the remote process bound to localhost and forward the port through SSH, as Node.js recommends. This lets your local debugger reach the remote process through the tunnel without making the Inspector publicly reachable.
Pick a client for the job
| Client | Workflow | Practical fit |
|---|---|---|
| Chrome DevTools or Microsoft Edge | Graphical browser-based inspection; attach through the browser’s inspect page. | A direct choice for interactive breakpoints, stepping, and inspecting execution in a graphical interface. |
| VS Code | Graphical IDE workflow using the Debug panel and a Node.js launch configuration. | Convenient if VS Code is already your editor and you want debugging beside your source. |
| Visual Studio, WebStorm/JetBrains IDEs, or Eclipse | IDE-based Inspector clients. | Consider these when they are already part of your development workflow; setup details vary by client. |
node inspect |
Interactive terminal debugger. | Useful for command-line work and for readers who prefer a terminal over a graphical client. |
node inspect --probe |
Non-interactive expression capture at source locations; experimental in the v26.10.0 reference. | A specialized option for targeted capture, not a general substitute for interactive stepping. |
No client is established by Node.js documentation as universally best. Choose based on whether you already use the editor, whether you want a graphical or terminal workflow, and whether you need interactive inspection or targeted non-interactive capture.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




