问题描述
我在我的 javascript 文件 (jaydata.js) 中添加了一个断点,并按下了跳到下一个函数调用".当它到达一行时:
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:
},
另一个名为[VM] (8312)"的文件弹出.我一直点击跳到下一个函数调用",现在我的屏幕是:
another file titled "[VM] (8312)" popped up. I kept clicking "Step over to the next function call" and now my screen is:
这些名为[VM](XXXX")的奇怪而神秘的脚本是什么?它们来自哪里?
推荐答案
[VM] (scriptId)
没有特殊含义.这是一个虚拟名称,可以帮助我们区分与文件名没有直接关联的代码,例如使用 eval
和朋友创建的代码.
[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.
过去,所有这些脚本都只是标记为(program)
.
In the past, all of these scripts were just labelled (program)
.
如果您有兴趣,只需在 Chromium 的源代码中查找 "[VM]"
,你会发现这些数字在开发者之外没有任何意义工具.
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.
[VM] (scriptId)
已重命名为 VMscriptId
不久前,这里是 直接链接到搜索结果,以防值再次更改.
[VM] (scriptId)
was renamed to VMscriptId
a while ago, and here is the direct link to search result in case the value changes again.
这篇关于Chrome 开发工具:来自 javascript 的 [VM] 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!