简体   繁体   中英

Source maps not loading at all

I'm trying to make source maps for AngularJS show in Chrome's developer tools. I made a simple webpage:

<!DOCTYPE html>
<html lang="en" ng-app>
<head>
    <meta charset="utf8">
    <title>Some App</title>
    <script src="lib/angular.min.js"></script>
</head>
<body>

<h1>Hello world! {{ 1+2 }}</h1>

</body>
</html>

This was saved as index.html , then I copied three AngularJS files ( angular.js , angular.min.js and angular.min.js.map ) straight from Angular's bower repository into the lib subdirectory, then made sure that the “Enable source maps” option is turned on in the developer tools' settings page. I serve the contents of this directory using python -m SimpleHTTPServer . Yet Chrome doesn't even query the server for the map file—that would show up in the server's logs.

Then I tried loading the source map demos like the Coffee Script demo or demos linked on HTML5Rocks page… none of them actually load the map files, which I guess would show up in the “Network” tab.

This is Chrome 28.0.1500.95 on a Debian SID system.

What I am doing wrong?

因此,显然Chrome仅在Chrome 30中处理“ //# ”新语法。http ://code.google.com/p/chromium/issues/detail?id=258349

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM