sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

Unable to Debug in Chrome or Edge

Open iamscottm opened this issue 8 years ago • 6 comments

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

Setup environment as described by the documentation and followed tutorial for generating helloworld webpart…. Expect to be able to configure debug through Edge using the extension and documented setup.... After much trial/error and research on this site I am posting an issue.

Observed Behavior

Depending on how gulp serve is started I get one of two outcomes:

Debugger Output: Error handling message from target: Invalid message: {"id":0,"result":{}}

Steps to Reproduce

Setup your dev environment per the documentation; Isntall Edge Debugger or Chrome Debugger extensions. Create a Basic HelloWorld webpart using latest Yeoman generator. Add workspace config for debug. Ensure all NPM packages are updated/installed Set a break point Run set NODE_NO_HTTP2=1&& gulp serve --nobrowser

Try launching from debug menu or MicrosoftEdge.exe --devtools-server-port 9222 https://localhost:4321/temp/workbench.html Either fails to attach to the browser/node server....

Here is the launch.json part: { "name": "Local workbench", "type": "edge", "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/" }

iamscottm avatar Jul 24 '18 22:07 iamscottm

The other outcome is browser pop-up message: Cannot connect to runtime process, timeout after 10000 ms - (reason: Cannot connect to the target: connect ECONNREFUSED 127.0.0.1:2015).

iamscottm avatar Jul 24 '18 22:07 iamscottm

Since this issue is fairly dated, can you verify if you are still having the issue in the latest version of SPFx, v1.7.1? There were a few fixes since this was posted that addressed issues related to debugging SPFx solutions with VSCode.

andrewconnell avatar Feb 14 '19 14:02 andrewconnell

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

msft-github-bot avatar Feb 21 '19 15:02 msft-github-bot

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

msft-github-bot avatar Mar 03 '19 18:03 msft-github-bot

Closing issue due no response from original author. If this issue is still occurring, please open a new issue with additional details. Notice that if you have included another related issue as additional comment on this, please open that also as separate issue, so that we can track it independently.

msft-github-bot avatar Mar 10 '19 19:03 msft-github-bot

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues

msft-github-bot avatar Jan 27 '20 00:01 msft-github-bot