3

I am trying to debug my SharePoint Framework web part in VS code using the Chrome Debugger extension but I am getting error message as Breakpoint ignored because generated code not found.

Also in Debug Console I am getting :

SourceMaps.loadSourceMapContents: Could not download sourcemap from https://localhost:4321/temp/manifestsFile.js.map

SourceMaps.loadSourceMapContents: Could not download sourcemap from https://localhost:4321/temp/manifests.js.map

I tried both Local workbench as well as Hosted workbench configuration but getting the same error.

Below is my launch.json file :

{
  "version": "0.2.0",
  "configurations": [{
      "name": "Local workbench",
      "type": "chrome",
      "request": "launch",
      "url": "https://localhost:4321/temp/workbench.html",
      "webRoot": "${workspaceRoot}",
      "sourceMaps": true,
      "sourceMapPathOverrides": {
        "webpack:///../../../src/*": "${webRoot}/src/*",
        "webpack:///../../../../src/*": "${webRoot}/src/*",
        "webpack:///../../../../../src/*": "${webRoot}/src/*"
      },
      "runtimeArgs": [
        "--remote-debugging-port=9222"
      ]
    },
    {
      "name": "Hosted workbench",
      "type": "chrome",
      "request": "launch",
      "url": "https://mytenant.sharepoint.com/_layouts/workbench.aspx",
      "webRoot": "${workspaceRoot}",
      "sourceMaps": true,
      "sourceMapPathOverrides": {
        "webpack:///../../../src/*": "${webRoot}/src/*",
        "webpack:///../../../../src/*": "${webRoot}/src/*",
        "webpack:///../../../../../src/*": "${webRoot}/src/*"
      },
      "runtimeArgs": [
        "--remote-debugging-port=9222"
      ]
    }
  ]
}

Can anybody please suggest me on this.

Thanks in advance.

2

1 Answer 1

0

I ran into this issue after it had been working. The issue for me was that I opened code from the command line at a folder level one higher, or the parent of the project. Closing Code and reopening at the project level worked for me.

If you .vscode folder is not in the same folder as your src folder this is probably your issue.

1
  • Hi @David I am opening the project from terminal using this directory: C:\spfx\helloworld-webpart\src , will that restrict me from debugging the solution in VS code?
    – mohd tahir
    Aug 30, 2017 at 10:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.