Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Unable to debug using --inspect-brk (blank source code) #697

Closed
gurupras opened this issue Jan 3, 2019 · 7 comments
Closed

Unable to debug using --inspect-brk (blank source code) #697

gurupras opened this issue Jan 3, 2019 · 7 comments
Labels

Comments

@gurupras
Copy link

gurupras commented Jan 3, 2019

When trying to debug using node --inspect-brk=0.0.0.0:9634 https-server.js --dev, the file https-server.js appears fine on my browser, however, the remaining files are all blank. As you can imagine, I'm having a really hard time debugging code.

https-server.js
image

The backend/server/server file referenced above has a debugger statement within it. The interpreter(?) correctly breaks at the debug point, however the code shows up blank.
image

Here are the versions I'm using:
node: v8.11.4
esm: 3.0.84
Chrome: Version 70.0.3538.110 (Official Build) (64-bit) (not sure if relevant)

@jdalton
Copy link
Member

jdalton commented Jan 3, 2019

Hi @gurupras!

We do support debugging in the Chrome inspector (with file sources visible). This looks like a bug/regression in the Chrome inspector. If you could provide a simple repro repo I could see if I can reproduce it.

@jdalton jdalton closed this as completed Jan 3, 2019
@gurupras
Copy link
Author

gurupras commented Jan 3, 2019

I'm struggling to create a simple repo to reproduce this. I currently have a large project whose code I cannot share which is suffering from this bug. Let me see if I can do a git bisect to determine what caused this regression to occur. I recall I was able to debug just fine several months ago.

@gurupras
Copy link
Author

gurupras commented Jan 3, 2019

Not sure if this helps at all, but everything works fine if I connect via Chrome on Windows (v71.0.3578.98). You're definitely right. It seems to be a problem with Chrome rather than esm.

@jdalton
Copy link
Member

jdalton commented Jan 3, 2019

Cool!

You should totally file a bug on them. In my experience they’ve been pretty responsive.

@gtarsia
Copy link

gtarsia commented Mar 27, 2019

This is working for me with chrome v75.0.3745.4 (dev branch).
But it's not working with Chrome Dev v73.0.3683.86 (stable branch).

Unfortunately the v75 version is also having problems to connect normally as explained here nodejs/node#23693.
So I have to connect manually to this url chrome-devtools://devtools/bundled/inspector.html?experiments=true&v8only=true&ws=localhost:9229/{token} with token being the token you get when you run node inspect (assuming 9229 is your port).

@june07
Copy link

june07 commented Mar 27, 2019

https://blog.june07.com/nim-custom-devtools-url

May find NiM useful. The blog post above specifically answers how to continue using the most recent Chrome(or Chromium based... soon to be Edge.) browser whilst changing the DevTools version to a working one.

https://github.com/june07/NiM
https://chrome.google.com/webstore/detail/nodejs-v8-inspector-manag/gnhhdgbaldcilmgcpfddgdbkhjohddkj

@jdalton
Copy link
Member

jdalton commented Mar 28, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

4 participants