Search code examples
coffeescriptwebstorm

WebStorm's 'CoffeeScript Source Map' File Watcher generates an error


I am trying to get chrome to use source maps so I can walk through my coffeescript not the transpiled javascript.

Using WebStorm 7, I have added a CoffeeScript Source Map File Watcher, like so:

webstorm settings - file watchers

Now whenever I make a change to a coffeescript file I see the following error:

source map error

Can you tell me the correct way to generate source maps for my coffeescript files so I can step through the coffeescript rather than the transpiled javascript.

Thanks


Solution

  • please remove the second watcher (CoffeeScript Source map) and edit the first one as follows:

    Program: C:\Users\janderson\AppData\Roaming\npm\coffee.cmd
    Arguments:  --compile --map $FileName$
    Working directory: $FileDir$
    Output paths to refresh: $FileNameWithoutExtension$.js:$FileNameWithoutExtension$.map