title: Enable JavaScript debugging with IntelliJ and source maps
body: <p>I am using IntelliJ 14.1.4 for creating a JavaScript application. For debugging, I fire up a webserver using Gulp. I then fire up the JavaScript debugging and connect with Chrome (via the plugin). I can debug "normal" JavaScript this way but when using source maps (created by browserify), IntelliJ does not trigger the break points anymore. If I use Chrome's debugging tools, everything works as expected but IntelliJ does not seem to being able to translate its break points.</p>
  
  <p>Is there any way to make this work? I have spent quite some time researching the issue and as far as I understand it, IntelliJ supports source maps. Also, I was able to debug GWT generated JavaScript using this approach which uses source maps, as well.</p>
  
  <p><em>Update</em>: It seems like there is a <a href="https://youtrack.jetbrains.com/issue/WEB-14454" rel="nofollow">current issue for this problem</a>. If any workarround is know, I am happy to hear a solution.</p>
  
  <hr>
  
  <p>The answer below solves the problem. Here is how I set up my gulp build:</p>
  
  <pre><code>bundler.bundle()
      .pipe(exorcist('./build/bundle.js.map', null, null, '../src'))
  </code></pre>
  
  <p>with <code>./build</code> being my build folder and <code>../src</code> being the root of the JavaScript source files, relative to the build folder.</p>