Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
400 views
in Technique[技术] by (71.8m points)

debugging - Chrome Development Tool: [VM] file from javascript

I added a breakpoint in my javascript file (jaydata.js) and was pressing "Step over to the next function call." When it got to a line that was:

},

another file titled "[VM] (8312)" popped up. I kept clicking "Step over to the next function call" and now my screen is:

enter image description here

What are these strange and mysterious scripts titled "[VM](XXXX " and where do they come from?

Question&Answers:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

[VM] (scriptId) has no special meaning. It's a dummy name to help us to distinguish code which are not directly tied to a file name, such as code created using eval and friends.

In the past, all of these scripts were just labelled (program).

If you're interested, just look up "[VM]"in the source code of Chromium, you will discover that these numbers have no significant meaning outside the developer tools.

update 2015-06-25

[VM] (scriptId) was renamed to VMscriptId a while ago, and here is the direct link to search result in case the value changes again.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...