SourceMaps.loadSourceMapContents:无法从下载sourcemaphttps://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js.map

SourceMaps.loadSourceMapContents:无法从下载sourcemaphttps://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js.map,angularjs,debugging,google-chrome-extension,visual-studio-code,Angularjs,Debugging,Google Chrome Extension,Visual Studio Code,我正在尝试用vscode和framework angular.js调试我的web应用,我已经下载了chrome扩展的调试,但是当启动程序时,在调试控制台上显示以下错误 SourceMaps.loadSourceMapContents: Could not download sourcemap from https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js.map 我的文件launch.json: { "

我正在尝试用vscode和framework angular.js调试我的web应用,我已经下载了chrome扩展的调试,但是当启动程序时,在调试控制台上显示以下错误

SourceMaps.loadSourceMapContents: Could not download sourcemap from https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js.map
我的文件launch.json:

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Chrome against localhost",
            "type": "chrome",
            "request": "launch",
            "url": "http://localhost/index.html",
            "webRoot": "${workspaceRoot}"
        },
        {
            "name": "Attach to Chrome",
            "type": "chrome",
            "request": "attach",
            "port": 9222,
            "webRoot": "${workspaceRoot}"
        }
    ]
}
我的html代码,其中call angular.min-js:

 <head>
    <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
    <script src="../js/todo.js"></script>

    <link rel="stylesheet" href="../css/todo.css">
  </head>


web应用程序位于IIS localhost中。你对解决这个问题有什么建议吗?或者使用其他方法调试angular应用程序并构建web应用程序。

我通过以下步骤解决了此问题:

  • 从下载源代码
  • 将源引用为文件src=“../js/angular.min.js”
  • 在launch.json中修改“webRoot”。add/JS/这里是存储javascripts文件的位置
  • launch.json

    {
        "version": "0.2.0",
        "configurations": [
    
            {
                "name": "Launch Chrome against localhost",
                "type": "chrome",
                "request": "launch",
                "url": "http://localhost/index.html",
                "webRoot": "${workspaceRoot}/JS/" 
                ,"diagnosticLogging": true,
                "sourceMaps": true
            },
            {
                "name": "Attach to Chrome",
                "type": "chrome",
                "request": "attach",
                "port": 9222,
                "webRoot": "${workspaceRoot}/JS/",
                 "sourceMaps": true
    
            }
        ]
    }
    

    作为一种解决方法,您可以尝试使用angular的非精简版本:将
    angular.min.js
    替换为
    angular.js