Chrome loads the source maps file for a JS file from a little comment in the file, like so:
/*
//@ sourceMappingURL=app.js.map
*/
Usually this is stripped out of the CoffeeScript compiler unless you specify the --bare
flag: http://coffeescript.org/#usage
Eg in my Gruntfile.coffee
I have:
module.exports = (grunt) ->
grunt.initConfig
coffee:
dev:
expand: true
cwd: 'assets/js/'
dest: '<%= coffee.dev.cwd %>'
ext: '.js'
src: [
'*.coffee'
'**/*.coffee'
]
options:
bare: true
sourceMap: true
This then opens up the CoffeeScript files to Chrome:
And if I add a debugger
in my code, per sa, I get: