Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the new AAD connection type and filtering feature to the symbol server docs #2840

Merged
merged 6 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ author: MSEdgeTeam
ms.author: msedgedevrel
ms.topic: conceptual
ms.prod: microsoft-edge
ms.date: 03/02/2022
ms.date: 09/19/2023
---

# Securely debug original code by using Azure Artifacts symbol server source maps
Expand All @@ -26,13 +26,53 @@ To learn about how to publish source maps, see [Securely debug original code by


<!-- ====================================================================== -->
## Step 1: Generate a Personal Access Token for Azure DevOps
## Step 1: Enable source maps in DevTools

To obtain source maps from the Azure Artifacts symbol server, DevTools uses the fetch protocol to talk to Azure DevOps, which requires a valid Personal Access Token (PAT).
To make sure that source maps are enabled in DevTools:

You need to generate a PAT even if you already generated one to publish source maps to the symbol server in [Securely debug original code by publishing source maps to the Azure Artifacts symbol server](publish-source-maps-to-azure.md).
1. To open DevTools, in Microsoft Edge, right-click a webpage, and then select **Inspect**. Or, press **Ctrl+Shift+I** (Windows, Linux) or **Command+Option+I** (macOS).

1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Preferences**.

1. Make sure the **Enable JavaScript source maps** checkbox and the **Enable CSS source maps** checkbox are selected:

![The Preferences configuration screen in DevTools settings](./consume-source-maps-from-azure-images/preferences-source-maps-devtools.png)


<!-- ====================================================================== -->
## Step 2 - Connect DevTools to the Azure Artifacts symbol server
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

DevTools needs to be configured to successfully retrieve the published source maps for your website.

To configure DevTools, you create an Azure Artifacts symbol server connection. There are two types of connections: **Azure Active Directory**, which is the easiest to use, and **Personal Access Token**.

#### Connect to the symbol server with Azure Active Directory
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Symbol Server**.

1. Click **Add Symbol Server connection** to start creating a new connection.

To generate a PAT in Azure DevOps:
1. In the **Authorization mode** dropdown, select **Azure Active Directory**.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

If the **Azure Active Directory** option is disabled, sign in to Microsoft Edge. To learn more, see [Sign in to sync Microsoft Edge across devices](https://support.microsoft.com/microsoft-edge/sign-in-to-sync-microsoft-edge-across-devices-e6ffa79b-ed52-aa32-47e2-5d5597fe4674).

1. Under **Azure DevOps organization**, click **Select**.

![The Symbol Server setting screen in DevTools](./consume-source-maps-from-azure-images/select-aad-org.png)

The list of DevOps organizations that you're a member of appears.

1. Double-click the organization that you want to connect to, or click it and then press **Enter**.

1. Click **Add** to create the connection.

![The Symbol Server setting screen in DevTools, showing the Add button to create a new connection](./consume-source-maps-from-azure-images/create-new-add-connection.png)

1. Click the **Close** (![Close settings icon](./consume-source-maps-from-azure-images/close-settings-icon.png)) button in the upper right to close the **Settings** panel, and then click the **Reload DevTools** button.

#### Connect to the symbol server with a Personal Access Token
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

To connect to the symbol server with a Personal Access Token (PAT), first generate a new PAT in Azure DevOps:
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. Sign in to your Azure DevOps organization by going to `https://dev.azure.com/{yourorganization}`.

Expand Down Expand Up @@ -64,43 +104,85 @@ To generate a PAT in Azure DevOps:

To learn more about PAT, see [Use personal access tokens](/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate).

With your new PAT generated, configure DevTools:
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Symbol Server**.

1. Click **Add Symbol Server connection** to start creating a new connection.

1. In the **Authorization mode** dropdown, select **Personal Access Token**.

1. In the **Azure DevOps organization** text box, enter the Azure DevOps organization where you created the PAT.

1. In the **Personal access token** text box, paste your personal access token (PAT).
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. Click **Add** to create the connection.

![The Symbol Server configuration screen in DevTools settings, showing the fields required to create a new PAT connection](./consume-source-maps-from-azure-images/create-new-pat-connection.png)
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. Click the **Close** (![Close settings icon](./consume-source-maps-from-azure-images/close-settings-icon.png)) button in the upper right to close the **Settings** panel, and then click the **Reload DevTools** button.


<!-- ====================================================================== -->
## Step 2: Configure DevTools
## Step 3: Retrieve original code in DevTools

DevTools now needs to be configured with the personal access token (PAT) to successfully retrieve the source maps.
After the above setup steps, when you use DevTools to work on a build of your website for which symbols have been published, you can now see your original source code, instead of the transformed code.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

To configure DevTools:
* In the **Console** tool, links from log messages to source files go to the original files, not the compiled files.

1. To open DevTools, in Microsoft Edge, right-click a webpage, and then select **Inspect**. Or, press **Ctrl+Shift+I** (Windows, Linux) or **Command+Option+I** (macOS).
* When stepping through code in the **Sources** tool, the original files are listed in the **Navigator** pane on the left.

1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Preferences**.
* In the **Sources** tool, the links to source files that appear in the **Call Stack** of the **Debugger** pane open the original source files.

1. Make sure the **Enable JavaScript source maps** checkbox and the **Enable CSS source maps** checkbox are selected:

![The Preferences configuration screen in DevTools settings](./consume-source-maps-from-azure-images/ado-preferences-source-maps-devtools.png)
<!-- ====================================================================== -->
## Connect to multiple Azure Artifacts symbol servers

You can configure DevTools to connect to multiple Azure Artifacts symbol servers if you need to fetch sourcemaps from different Azure DevOps organizations for your website.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. In the sidebar of the **Settings** page, click **Symbol Server**.
1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Symbol Server**.

1. In the **Azure DevOps organization** text box, enter the Azure DevOps organization where you created the PAT.
1. Click **Add Symbol Server connection** to create an additional connection.

1. In the **Azure DevOps personal access token** text box, paste your personal access token (PAT).
1. Refer to [Connect to the symbol server with Azure Active Directory](#connect-to-the-symbol-server-with-azure-active-directory) or [Connect to the symbol server with a Personal Access Token](#connect-to-the-symbol-server-with-a-personal-access-token) to configure the new connection.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

![The Symbol Server configuration screen in DevTools settings](./consume-source-maps-from-azure-images/ado-pat-devtools.png)
To edit or remove an existing connection, hover over the connection, and then click the **Edit** (![Edit icon](./consume-source-maps-from-azure-images/edit-connection-icon.png)) or **Remove** (![Remove icon](./consume-source-maps-from-azure-images/remove-connection-icon.png)) button next to the connection on the **Symbol Server** settings page.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

1. Click **x** in the upper right to close the **Settings** panel, and then click the **Reload DevTools** button.
![The remove and edit buttons, on a connection item, in the Symbol Server settings page](./consume-source-maps-from-azure-images/edit-remove-connection.png)


<!-- ====================================================================== -->
## Step 3: Retrieve original code in DevTools
## Filter source maps by URL

After the above setup steps, when you use DevTools to work on a build of your web site for which symbols have been published, you can now see your original source code, instead of the transformed code.
You can decide which source maps to download, per Azure Artifacts symbol server connection, by using the **Filter behavior** feature.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

* In the **Console** tool, links from log messages to source files go to the original files, not the compiled files.
1. In DevTools, click **Settings** (![Settings icon](./consume-source-maps-from-azure-images/settings-gear-icon-light-theme.png)) > **Symbol Server**.

* When stepping through code in the **Sources** tool, the original files are listed in the **Navigator** pane on the left.
1. Create a new connection or edit an existing connection.

* In the **Sources** tool, the links to source files that appear in the **Call Stack** of the **Debugger** pane open the original source files.
1. In the **Filter behavior** dropdown, select either **Exclusion List** to exclude specific source maps, or **Inclusion List** to only include specific source maps.

1. In the text box below the dropdown, enter one URL per line for the source maps that you want to exclude or include.
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved

![The inclusion list setting in a symbol server connection edit screen](./consume-source-maps-from-azure-images/filter-inclusion-list.png)

captainbrosset marked this conversation as resolved.
Show resolved Hide resolved
The following wildcards are supported:

| Wildcard | Meaning |
|---|---|
| ? | Matches a single character. |
| * | Matches one or more of any character. |

If you select **Exclusion List**, DevTools attempts to look up any source maps for scripts except those that have a URL that matches one of the entries in the list.

If you select **Inclusion List**, DevTools only attempts to look up source maps for scripts that have URLs that match one of the entries in the list. For example, suppose you select **Inclusion List** in the **Filter behavior** dropdown list, and then enter the following in the **Filter behavior** text box:

```
https://cdn.contoso.com/*
https://packages.contoso.com/*
```

In this example, DevTools only attempts to resolve source maps that match these two URL patterns, and doesn't attempt to load source maps for other scripts.


<!-- ====================================================================== -->
Expand Down
2 changes: 1 addition & 1 deletion microsoft-edge/web-platform/os-regional-settings.md
captainbrosset marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ms.date: 08/19/2022
---
# Operating System Regional Data Display

Microsoft Edge provides operating system (OS) regional preference information to help website authors create regional experiences on their web site, when viewing your site using Microsoft Edge. This feature allows website authors to deliver value to users who specifically change their regional preferences in the OS to reflect their personal preferences.
Microsoft Edge provides operating system (OS) regional preference information to help website authors create regional experiences on their website, when viewing your site using Microsoft Edge. This feature allows website authors to deliver value to users who specifically change their regional preferences in the OS to reflect their personal preferences.

Users want to see dates, times, numbers, and other formatting printed according to their preferences. For example, the US geographic region translates **7/2/2022** into **July 2nd, 2022**. Another geographic region could translate that same date into **February 7, 2022** because they read the month and day inversely.

Expand Down
Loading