Chrome developer tools can't see javascript

So, I have such a strange thing where my javascript does not appear in my sources window. If I installed debugger in my js and then reload the page, it will break and I will see javascript. The strange thing is that instead of the bookmark marked MyJavascriptFile.js , it reads [VM](62) or some other number. I tried reinstalling chrome and it did not fix my problem. Previously, this was not, any ideas what is happening? Its just really annoying to go to my javascript by adding debugger instructions.

+6
source share
3 answers

I have this problem right now. There must be a bug in Chrome. All you have to do is load the console (f12) and then reload the page while the console loads. Now you can see your code.

+5
source

It is strange that instead of a bookmark marked as MyJavascriptFile.js, it reads a VM or some other number.

This is because you are accessing the script through localhost and, therefore, are implementing security policies. If you host the file by IP or domain name, you can debug it again.

+4
source

Hi, look at your web.config,

javascript files will not be displayed and will have an alphanumeric name if your debug attribute is set to false. Set it to true and try debugging again

  <system.web> <compilation debug="false" targetFramework="4.0"> 

You can also see the VM for the javascript file name when you execute dynamic javascript (e.g. javascript template) via a callback in $ .ajax post

0
source

Source: https://habr.com/ru/post/947222/


All Articles