CoffeeScript Debugging with Sourcemaps in WebStorm 6 / PhpStorm 6
Users of other JetBrains IDEs (RubyMine, PyCharm, IntelliJ IDEA, …) will need to download and install the File Watchers plugin to use this functionality (available for free).
To debug a CoffeeScript File:
Install CoffeeScriptRedux (Redux is still in beta, but it is required for generated sourcemaps for debugging. As it nears release, we’ll improve support and make this process much smoother with much less configuration)
Set up a CoffeeScript file watcher using Redux (this is a bit different from the default template which uses the non-Redux version of the CoffeeScript compiler, so follow this screenshot carefully):
- Set up a CoffeeScript Sourcemap Compiler watcher:
- Add the "sourcemapping url" to your generated JS file (this process will improve as the CoffeeScript Redux project improves! We may add our own support, but for now it’s best to create a reusable live template snippet you can add quickly):
- Start a debug session from your HTML file:
- Add breakpoints to your CoffeeScript code:
Debugging other types of files that support sourcemaps (TypeScript, etc) is even easier: just set up the watcher, put breakpoints and start a debug session.
Please download the latest build, provide feedback for bugs and feature requests here, and leave questions in the comments below or in our forums!
Develop with pleasure!
-JetBrains WebStorm Team