New issue
Advanced search Search tips

Issue 849874 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

node inspect shows wrong version of source code after saving server source

Reported by quux...@gmail.com, Jun 5 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36

Steps to reproduce the problem:
1. run a node server with `node --inspect foo-server.js`
2. open node dev console, click "+ add folder to workspace", and add the folder containing foo-server.js
3. set a breakpoint in foo-server.js then hit it twice by making two requests
4. edit foo-server.js and save, and observe it being updated in console
5. continue from the first breakpoint. Now the second breakpoint will be triggered.

At this second breakpoint, the node thread is executing the first version of foo-server.js but the developer console shows you're debugging the second version.

What is the expected behavior?
1. In step 4, the console _should not_ update the code immediately on saving. It should only show the newer version if the thread being debugged is running the newer version.
2. Whenever a breakpoint is triggered, the correct version for that file should be loaded and displayed

What went wrong?
The dev console is getting extremely confused on what version of the file the node process is executing when a breakpoint is triggered.

Did this work before? No 

Chrome version: 66.0.3359.139  Channel: n/a
OS Version: OS X 10.13.4
Flash Version: 

This is clearly extremely confusing and broken behavior for a debugger. Yes, this is a complex problem.
But given how inaccurate the debugger is during normal / easily achieved debugging flow of a server, auto code refresh should probably be disabled for remote node debugging until this is fixed.
 
Labels: Needs-Triage-M66
Cc: phanindra.mandapaka@chromium.org
Labels: Triaged-ET Needs-Feedback
Thanks for filing the issue!

@Reporter: Could you please share a sample test file/URL for ease of reproducing this.

Comment 3 by quux...@gmail.com, Jun 7 2018

It can be reproduced with any node server, like a hello world server. It
doesn't matter.
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 7 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by kozy@chromium.org, Jun 11 2018

Owner: kozy@chromium.org
Status: Assigned (was: Unconfirmed)

Sign in to add a comment