SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1.01k forks source link

When launching VS Code debugger, {tenantDomain} is not replaced with environment variable #8956

Open DonKirkham opened 1 year ago

DonKirkham commented 1 year ago

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

Linux

What browser(s) / client(s) have you tested

Additional environment details

Describe the bug / error

When launching debugger in VS Code with no changes to default debugging profile, the browser opens to

https://%7Btenantdomain%7D/_layouts/workbench.aspx

The environment variable is set as follows:

❯ echo $SPFX_SERVE_TENANT_DOMAIN
myspdomain.sharepoint.com

NOTE: gulp serve works correctly with the above environment variable

Steps to reproduce

  1. Create SPFx solution, Webpart, with all default values
  2. Run gulp serve
  3. Press F5 to start debug session Browser (msedge) opens to https://%7Btenantdomain%7D/_layouts/workbench.aspx

Expected behavior

Browser should open to https://myspdomain.sharepoint.com/_layouts/workbench.aspx

ghost commented 1 year ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

AJIXuMuK commented 1 year ago

Thanks @DonKirkham for this! It's a good enhancement we will consider.