1

I have to debug a javascript file and for that I opened my chrome developer tool(please see the image below). I was expecting a folder named builders inside scripts folder which contains the javascript files I need to debug but it's not there. I updated the chrome to the latest version 53.0.2785.116 m (64 bit) but no luck.

Does anyone know what could be the problem?

enter image description here

John
  • 1,210
  • 5
  • 23
  • 51
  • Have you tried searching for the file you want directly using `Ctrl+P`? Also, what _is_ in the builders directory? Because the name suggests it may be the build tools which I wouldn't expect to see on a webpage. – VLAZ Sep 19 '16 at 20:24
  • This could be due to no files being included, can you check the importing URL? – roberrrt-s Sep 19 '16 at 20:24
  • @vlaz Where would you like me to do `Ctrl+P` ? In the developer tool? `builders` folders contains some javascript files which are basically used to build the webpage. Basically they are getting data via ajax call and displaying on webpage. – John Sep 19 '16 at 20:26
  • @Roberrrt Could you please elaborate on `importing URL` ? Thanks – John Sep 19 '16 at 20:27
  • Basically what all the answer-givers were saying, but if you state your app wouldn't be working without it, I suppose that is not the problem. – roberrrt-s Sep 19 '16 at 20:28
  • @John - `Ctrl + P` in the Sources tab in the dev tools, yes. Also, if the build tools are what is _building_ your page, then, by definition, they won't be included _on_ the page. They would be invoked before the page gets displayed at all. – VLAZ Sep 19 '16 at 20:34
  • @vlaz Thanks. `Ctrl + P` in the sources tab couldn't locate the file I am trying to debug. If by definition, build tools won't be included on the page, then how can I debug if I have to? – John Sep 19 '16 at 20:45
  • @John well, not easily. There is a way to attach a remote debugger to a JS file, I believe, but I've personally not actually done it. I suggest using generous amount of `console.log` statements that will tell you what the build tools are doing. – VLAZ Sep 19 '16 at 20:47

2 Answers2

0

Make sure the script is included in the the home.html file

<script src="scripts/builders/SCRIPTNAME.js"></script>

James
  • 22
  • 3
  • 1
    It's there, because if it wasn't there, my web app won't be working. – John Sep 19 '16 at 20:26
  • Of course. According to this question, http://stackoverflow.com/questions/31862344/chrome-developer-tools-do-not-show-all-javascript-files-any-more, it looks like it may be a bug in Chrome. A number of solutions are offered there – James Sep 19 '16 at 20:32
  • If it's a bug, looks like google still hasn't fixed it. The author in the above post is using `Version 44.0.2403.130 ` and it's `version 53.0.2785.116` that I am using. Strange ! – John Sep 19 '16 at 20:34
0

Perhaps you just forgot to link a script file from scripts/builders/ directory. Try to filter scripts files in Network tab.

  • Thanks but that's not the case. My webapp is working fine. The only problem is that the file isn't traceable on the developer tool. – John Sep 19 '16 at 20:29