Opening background.html directly in Chrome will show the coffee file when inspecting javascript error. However when the code is loaded as an extension, only the compiled javascript is shown, ignoring the sourcemap.
Related to Chromium issue 212374.
Opening background.html directly in Chrome will show the coffee file when inspecting javascript error. However when the code is loaded as an extension, only the compiled javascript is shown, ignoring the sourcemap.
Related to Chromium issue 212374.
# Some stupid code that will issue an error | |
foo = 2 | |
derp = foo*2 + bar | |
console.debug "Should have been an error right there." |
<!DOCTYPE html> | |
<html> | |
<script type="text/javascript" src="background.js"></script> | |
<body></body> | |
</html> |
// Generated by CoffeeScript 1.6.2 | |
(function() { | |
var derp, foo; | |
foo = 2; | |
derp = foo * 2 + bar; | |
console.debug("Should have been an error right there."); | |
}).call(this); | |
/* | |
//@ sourceMappingURL=background.map | |
*/ |
{ | |
"version": 3, | |
"file": "background.js", | |
"sourceRoot": "", | |
"sources": [ | |
"background.coffee" | |
], | |
"names": [], | |
"mappings": ";AAEA;CAAA,KAAA,GAAA;;CAAA,CAAA,CAAA;;CAAA,CAEA,CAAO,CAAP;;CAFA,CAIA,GAAA,EAAO,iCAAP;CAJA" | |
} |
{ | |
"name": "Test Sourcemaps in Chrome Extensions", | |
"version": "0.1", | |
"manifest_version": 2, | |
"description": "Sourcemaps don't work in Chrome Extensions.", | |
"background": { | |
"page": "background.html" | |
} | |
} |