New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716375 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

using sourceURL resulting in inconsistent debugging experience

Reported by m...@mattbolt.com, Apr 28 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36

Steps to reproduce the problem:
I've recently learnt about the //#sourceURL functionality in the chrome debugger and have been excitedly using it. Note that I am not using minified files and not supplying map files. I'm strictly using #sourceURL to help debug scripts being loaded dynamically at runtime.

1. Including //# sourceURL: /some/filename at the top of my javascript files

2. Dynamically loading javascript files by adding a <script> tag to the <head> tag and setting the url via javascript at runtime. Or alternatively using jQuery's $.getScript() function.

3. set breakpoints in the code and debug functionality

What is the expected behavior?
My expectation is that i can step through the code as usual to debug line by line.

What went wrong?
The debugger seems to be mapping the source incorrectly. Stepping line by line jumps large portions of code. Often I cannot set breakpoints where i want, it jumps the breakpoint to lines below. The little blue subbreakpoint indicators seem to suggest it thinks its referring to the line above.

If I remove the #sourceURL directive from the code and use debugger; to break the code manually I can set breakpoints on the VMXXX file that opens and the debugger works correctly.

Did this work before? N/A 

Chrome version: 58.0.3029.81  Channel: stable
OS Version: 10.0
Flash Version: 

I have tried using Alt+R to restart devtools, it doesn't seem to help. I cannot seem to find a way to tell the browser to flush its cache of previous #sourceURL references. Ideally I would love to be able to invalidate a virtual #sourceUrl file manually or flush it from devtools so it forgets all previously set breakpoints / cached dynamic maps etc.
 
Labels: Needs-Feedback
Owner: kozyatinskiy@chromium.org
Status: Assigned (was: Unconfirmed)
Could you please attach a script/page where this does happen?
Status: WontFix (was: Assigned)
Feel free to reopen this with specific repro case and we will find a root of this issue otherwise provided information is not enough for repro.

Sign in to add a comment