A question before posting an issue on bugs.chromium.org

31 views
Skip to first unread message

Oleksii Kadurin

unread,
Jan 11, 2017, 4:35:27 PM1/11/17
to Google Chrome Developer Tools
Hi! I'm creating an issue on https://bugs.chromium.org. And it's not so easy to find steps to reproduce the issue I would like to report about.
So maybe somebody can help me in that.

The issue is that sometimes when I debugging step by step and step into the particular function (F11) the Source panel opens a tab
that has name like "VM326". However I definitely know that the function is not a part of "eval". It's a part of external js file.
So I assume that newly opened tab should show correct file name and not "VM326".

Investigating some time I have come to the conclusion, that information about scripts comes from this line:

The messageEvent.data contains params.url which is empty. But usually it contains the file path.

My questions are:
1) What can be the reason of that "bad" file name in the Source tab (maybe it's known issue)
2) Since Connections.js is a part of SDK ('backend'), I can't inspect it's logic that sends messageEvent objects.
So maybe you know in what cases this._socket.onmessage (inside Connections.js) is called with the messageEvent objects,
that contains params.url as empty string. 

Thanks! 

Oleksii Kadurin

unread,
Jan 12, 2017, 3:07:07 AM1/12/17
to Google Chrome Developer Tools
Here's some discussion on SO http://stackoverflow.com/questions/17367560/chrome-development-tool-vm-file-from-javascriptLooks like good point to start
Additionally my script is added via document.write. And it seems that's is the reason why the script is considered dynamic and labeled VM[xxx].

PhistucK

unread,
Jan 12, 2017, 3:30:27 AM1/12/17
to Google Chrome Developer Tools
Yes, this answer shows how to get around it.

document.write is a really bad practice. :(


PhistucK

--
You received this message because you are subscribed to the Google Groups "Google Chrome Developer Tools" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-chrome-developer-tools+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-chrome-developer-tools/333f1551-abb6-4783-91aa-2ca118f95c4b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Oleksii Kadurin

unread,
Jan 12, 2017, 3:40:43 AM1/12/17
to Google Chrome Developer Tools
Hey, thanks for clarifying. 
>>> document.write is a really bad practice. :(
Agree. But unfortunately for me I can't (no rights) refactor it in the project I work in. 
The first time I entered the function that was in the VM326 file, I was wonder where does that file is located. 
And when made a right click on the tab's name and selected "Copy link address" it copied "debugger:///VM326", which is no helpful.
So to figure out what file contains the code, I had to search through the source code.
Reply all
Reply to author
Forward
0 new messages