more G-Labs products

Author Topic: Debug JavaScript  (Read 1475 times)

January 27, 2017, 07:24:26 PM
Reply #15

Bounz

  • ***
  • Information
  • Full Member
  • Posts: 94
Quote
When the page is viewed in Chrome, the JS code have already been executed and produced HTML code?

Actually you can setup a breakpoint and then refresh the page, Chrome will remember the position of breakpoint and will break execution of JS at that point, so you could see how it is evaluating and what HTML is produced.

Quote
Chrome don't know where the sourcecode files are?
Chrome does know location of files when it downloads them.
But when you try to debug HG you will see huge files homegenie.api.js and homegenie.webapp.js instead of a number of smaller files located in js/api and js/app folders. This happens because when HG is concatenating these small js files.
But this is not a big problem, because you always can search for specific text (code) in DevTools and VS.