[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.
It is abbreviation of the phrase Virtual Machine. In the Chrome JavaScript engine (called V8) each script has its own script ID.
Sometimes V8 has no information about the file name of a script, for example in the case of an eval
. So devtools uses the text "VM" concatenated with the script ID as a title for these scripts.
Some sites may fetch many pieces of JavaScript code via XHR and eval
it. If a developer wants to see the actual script name for these scripts she can use sourceURL. DevTools parses and uses it for titles, mapping etc.