title: Ionic/Cordova: How to debug JavaScript codes that require "cordova.js" library in a web-browser
body: <p>I am developing an app for Androind using Ionic framework.
  The app uses Cordova Medila plugin and to use that I need to include:</p>
  
  <pre><code>&lt;script src="cordova.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>in my html code. This is required to be able to run the code on Android, however there is not a <code>cordova.js</code> in the www directory and Ionic finds it in one of its subfolders when it wants to build for Android.</p>
  
  <p>I need to debug the code and want to run the JavaScript line by line in Chrome, but becuase chrome cannot find <code>cordova.js</code>, it gives error (like "gap_init:2").</p>
  
  <p>I tried to find a copy of <code>cordova.js</code> in a sub-folder of the app that belongs to Android platform and copy it to <code>www\js</code> folder but when tried to run my html code I got strange errors during loading of the html file.</p>
  
  <p>My question is:
  Is it possible to debug these applications in Chrome? If it is how? If it is not, are there IDEs or tools that can be used for debug? </p>