MicrosoftEdge / DevTools

Feedback and discussions about Microsoft Edge Developer Tools
MIT License
155 stars 51 forks source link

[Feedback] Retrieve source maps from Symbol Server #5

Open captainbrosset opened 2 years ago

captainbrosset commented 2 years ago

Starting with Microsoft Edge 99, DevTools is able to securely retrieve source maps published to Azure Artifacts symbol server. This means source maps can easily be published as part of a build system, and then securely be retrieved at runtime, by DevTools, from the symbol server, removing the need to host them on your web server.

See the announcement blog post, and user documentation for more information.

As mentioned in the blog post, DevTools' ability to download from Azure is only a first step and we are interested in hearing from you about what services, other than Azure, you would like DevTools to be able to connect to.

This issue is a central location where we will collect your feedback about the above.

IllusionMH commented 2 years ago

Are there plans to allow simple drag'n'drop (as implemented in Azure Monitor) or "Open folder" actions for source maps?

Looks like existing "Add source map..." from context menu requires post url for this file, however dragging/opening folder/.zip file will be much easier.

While this is not as cool as loading them automatically, this will cover all other cases when developers can get access to source maps, but have no control if maps can be uploaded to Azure or services added later.

P.S. Sorry for second comment notification.

robpaveza commented 2 years ago

I hadn't considered that, @IllusionMH, but I think that could be interesting overall. I'd encourage you to open a separate issue.

One thing that might satisfy here is that we've also tentatively put on our roadmap the ability to implement a Symbol Server-equivalent via an Edge Extension. We haven't committed to this work yet -- and it might not work if you wanted to serve the source maps from a local file system -- but we do want to give people more flexibility than just using Azure services for this purpose.

HolgerJeromin commented 2 years ago

We use an self hosted Azure DevOps Server to build our software. This is not available without a VPN so I am a bit unsure how this feature will be usable for us. For our c++ and csharp code we use a shared network folder which is configured in VS as a symbol server with Tools > Options > Debugging > Symbols

levrik commented 7 months ago

Was the existing "Add source map..." menu item removed to force people to use Azure Symbol Server? It simply doesn't show up for me.

image

captainbrosset commented 7 months ago

I'm still seeing the Add source map... context menu item when I right-click on the code editor (i.e. not on the file name in the sidebar). @levrik can you try and see if this works for you?

levrik commented 7 months ago

@captainbrosset This seems to work but was nowhere mentioned online (always right click on the file name). Thanks!

captainbrosset commented 7 months ago

Our documentation mentions this: https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/sources/#mapping-minified-code-to-your-source-code-to-show-readable-code

In the Editor pane, if you right-click a JavaScript file and then select Add source map, a popup box appears, with a Source map URL text box and an Add button.

And the Editor pane is defined earlier in the document https://learn.microsoft.com/en-us/microsoft-edge/devtools-guide-chromium/sources/#using-the-editor-pane-to-view-or-edit-files

levrik commented 7 months ago

@captainbrosset I tried finding information about Edge specifically via search engines but that particular page didn't show up for me. I could only easily find information about Chrome and assumed it to work the same in Edge as they share the same foundation.

WillGrayMSU commented 6 months ago

So I am attempting to get this working, but whenever I check the sourcemap monitor all I see is "Unknown error requesting source map: Failed to fetch" I can confirm that the Sourcemaps are being tagged, and uploaded to the symbol server. In fact, if I check the requests via fiddler, I can see that Edge is hitting the symbol server and getting a 200 response followed by a 302 FOUND response.

When I put the URL of the 200 response into my browser, I do get the JSON response with the BlobUri information This URL is truncated by a NoRedirect parameter. If however, I remove the NoRedirect, I see in the DevTools Network tab that the initial 200 response of the URL I pasted is followed by a 302 response and the SourceMap is downloaded.

Is the 200 to 302 reponse expected? And should Edge be adding the NoRedirect url parameter?

Info: Edge Version 123.0.2420.81 (Official build) (64-bit) running on Windows 11 Enterprise 22631.3296

captainbrosset commented 6 months ago

Thanks for the great feedback @WillGrayMSU. Let me move this specific feedback into its own issue for easier tracking.