0

When I upload to dreamhost my page, I can't debug it because javascript appears with no end of line, like this for example:

function fun(){ alert("1");alert("3");if($("#tbTitulo").val()==""){alert("1");return;}}

so it is practically impossible to debug. I tried on firefox and chrome with the same results. I don't know why this is happening. If you could give me some clue I'd really appreciate it.

PeeHaa
  • 71,436
  • 58
  • 190
  • 262
Sfp
  • 539
  • 4
  • 15

2 Answers2

3

You can prettify the code in Chrome Developer Tools. The button is the last one on the bottom row on the sources tab (it looks like a pair of curly brackets): https://stackoverflow.com/a/6318092/1669279

Community
  • 1
  • 1
Tibos
  • 27,507
  • 4
  • 50
  • 64
0

First you have to Beautify, unpack or deobfuscate JavaScript and HTML, make JSON/JSONP readable, etc.

check here http://jsbeautifier.org/

after that you can insert breakpoint to debug.

akbar ali
  • 427
  • 2
  • 6