VM stack in Chrome

301 阅读1分钟

stackoverflow.com/questions/1…

it says:
[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.
code.google.com/p/chromium/…

More tricks about javascript debugging could be found here:

developer.chrome.com/devtools/do…
Test:

<html>
<script>
window.eval("console.log(\"ok\");debugger;");
//# sourceURL=dynamicScript.js
</script>
</html>
```要获取更多Jerry的原创文章,请关注公众号"汪子熙":
<img src="https://user-images.githubusercontent.com/5669954/61616089-2a87e180-ac9a-11e9-861d-c29c2cf897af.png">