I am able to compile coffee file to .map file in the same directory as the .coffee/.js file when I call
coffee --nodejs --debug-brk app.coffee
and start the node-inspector. The js version of the app file gets loaded in chrome. what am i missing??
this is what chrome is showing for three.coffee file ..
(function (exports, require, module, __filename, __dirname) { // Generated by CoffeeScript 1.6.2
(function() {
app.get('/three', function(req, res) {
debugger; return res.send('three/teedde');
});
}).call(this);
/*
//@ sourceMappingURL=three.map
*/
});
thanks
You are you asking about node-inspector since you say you are starting it? Your question appears as if you are asking about the Chrome dev tools. Please clarify.
The current version of node-inspector in npm (0.2.0beta4) does not support source maps.
Even though the issue has been closed, I have been unable to find anything on github that would enable this feature (e.g. see https://github.com/dannycoates/node-inspector/blob/update-ui/lib/session2.js#L123-L131, there is no sourceMapURL parameter for the scriptParsed event).
node-inspector was taken over by a new developer and according to a comment (by Vitaliy Lebedev) the latest version does support source maps.
If you are asking about the Chrome dev tools - they support source maps.
try "//@ sourceMappingURL=three.map" on the last line in your js file.
Also make sure that your express app is actually serving the .map and .coffee files required by the debugger (check by entering the url+filename in your browser).
And now node-inspector supports source maps! github.com/node-inspector/node-inspector/issues/… – Vitaliy Lebedev Nov 8 '13 at 12:46
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With