Welcome to the Linux Foundation Forum!

Can't see the source code in the Chrome Inspector

Options
toramanomer
toramanomer Posts: 5
edited October 2021 in LFW211 Class Forum

Hello,

I'm following Debugging and Diagnostics - Starting in Inspect Mode section of *--Node.js Application Development course.

I started the execution with the following command:

$ node --inspect-brk index.js

I can see my application on chrome://inspect, however, when I hit on Inspect button, although I see that Debugger is paused, I cannot see the source file.

Here how it looks like:

Answers

  • krave
    krave Posts: 58
    Options

    You can wait for a while to allow debugger load source code or manually click where the blue arrow stopped in the Call Stack panel.

  • davidmarkclements
    Options

    not all source code loads immediately when you use inspect-brk, this is becuase inspect-brk puts a break on line 0 of your code, so any dependencies you require won't be loaded until you continue the runtime. One way to see this in action, is to just keep Stepping and see the sources load as you do.

This discussion has been closed.

Categories

Upcoming Training