title: Debugging JavaScript minification errors (in Liferay 6.2)
body: <p>Liferay 6.2. tries to use best practices and JS minification is one of them.</p>
  
  <p>But what do you do when your unminified JavaScript works and minification produces errors like this (in Tomcat console):</p>
  
  <pre><code>12:23:48,794 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 607: 21: identifier is a reserved word
  12:23:48,797 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 608: 45: identifier is a reserved word
  12:23:48,802 ERROR [http-bio-8080-exec-10][MinifierUtil:111] 1: 0: Compilation produced 2 syntax errors.
  12:23:48,805 ERROR [http-bio-8080-exec-10][MinifierUtil:88] JavaScript Minifier failed for_________    AUI().use('node', 'aui-base', 'aui-io-request', 'aui
  </code></pre>
  
  <p>[MinifierUtil:111] 607: 21: and [MinifierUtil:111] 608: 45: are not line numbers in your code (jsp/ftl/...) as man expects from console log and googling "identifier is a reserved word"  or "JavaScript Minifier failed for_________" helped me almost nothing (ok, I knew about <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#Keywords</a> normally).</p>
  
  <p>Pasting code between <code>&lt;script&gt;</code> and <code>&lt;/script&gt;</code> to JS lint or hint or any other JS tool is not an option as it contains many JAVA and spring/freemarker/liferay tags etc...</p>
  
  <p>So - my question is - as I wasn't able to find best practices / methodologies for debugging this - what is your opinion (or even better - experience :)) ?</p>