How to debug scripts in Firebug?

I could never correctly see the script in Firebug, each of them is displayed on one line. As shown in the image below:

http://img716.imageshack.us/img716/1126/54274507.png How can I view it correctly so that I can debug it?

Thank you in advance!

+4
source share
3 answers

For your own scripts just call:

console.log(someObject); 

I usually find myself in the Console tab and see what errors or registered items are logged in, or use the console to enter the code I want to run.

I never use the "Script" tab.

If you just want a good view of the code, use the decorator: jsbeautifier.org

0
source

This script has been reduced by removing all extraneous spaces.

You cannot easily debug such scripts.

Scripts that you write yourself that have not been minified or compressed will usually appear on several lines and can be debugged.

+3
source

Script writers minimize and often change variable names to complex alphanumeric names, basically wanting the script to be the least readable for people, so that no one copies their code / logic, as this can be easily done using firebug and the like things, such scripts can be a real pain for debugging, and there is very little chance that you can figure it out. All the best with the task anyway.

Did you try to debug it if a breakpoint on this available line?

0
source

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


All Articles