So I am having this really weird thing where my javascript doesn't show in my sources window. If I set a debugger
in my js and then reload the page, it will break and I can see the javascript. The weird thing is that instead of the tab being labeled MyJavascriptFile.js
it reads [VM](62)
or some other number. I have tried reinstalling chrome and it didnt fix my problem. It didn't used to be like this, any ideas what is going on? Its just really annoying to have get to my javascript by adding debugger statements.
Asked
Active
Viewed 6,478 times
6

jensengar
- 6,117
- 17
- 58
- 90
-
How is your _JavaScript_ being loaded into the page? – Paul S. Jun 13 '13 at 14:25
-
– jensengar Jun 13 '13 at 14:26
-
It seems like this happened about the time I started doing performance profiles and memory analysis. I only did that for a day and haven't done anything like it for at least a week. Maybe that has something to do with it? – jensengar Jun 13 '13 at 14:29
-
1Do you get the same behaviour for files not hosted on `localhost` (i.e. served by domain name or IP)? – Paul S. Jun 13 '13 at 14:30
-
It looks like I can see the scripts on stackOverflow's page. – jensengar Jun 13 '13 at 14:31
2 Answers
7
I'm having this problem right now. Must be a bug in Chrome. All you have to do is load the console (f12) then reload the page whilst the console is loaded. You can now see your code.

Welshboy
- 318
- 4
- 10
4
The weird thing is that instead of the tab being labeled MyJavascriptFile.js it reads VM or some other number.
This is because you are accessing your script through localhost
, and therefore running into security policies. If you host your file at an IP or domain name, you'll be able to debug normally again.

Paul S.
- 64,864
- 9
- 122
- 138
-
1Well how come I didn't used to have that problem and my coworkers dont have that problem either? It's the same code. – jensengar Jun 13 '13 at 18:52