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 an allowlist/denylist for browser sourcemap locations #1707

Open
swatDong opened this issue May 18, 2023 · 1 comment
Open

Add an allowlist/denylist for browser sourcemap locations #1707

swatDong opened this issue May 18, 2023 · 1 comment
Assignees
Labels
feature-request Request for new features or functionality

Comments

@swatDong
Copy link

Describe the bug
I'm debugging a React app in msedge. Instead of launching localhost, I'm launching teams.microsoft.com since my app will be loaded in Teams (iframe to localhost).
The issue is, if I set any breakpoint before launching, the whole browser gets slow and loads for several minutes.
But when there's no breakpoint, or set after page launched, the browser acts as normal.

To Reproduce
Steps to reproduce the behavior:

  1. Create react app npx create-react-app my-app
  2. Open the app in VSCode
  3. Add launch.json
{
  "version": "0.2.0",
  "configurations": [
      {
          "type": "msedge",
          "request": "launch",
          "name": "Launch Teams",
          "url": "https://teams.microsoft.com/_#/l/app/",
          "webRoot": "${workspaceFolder}/src",
          "trace": true
      }
  ]
}
  1. Set breakpoint
  2. Debug

Log File
Sent via email

VS Code Version:
Version: 1.78.2 (user setup)
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:39:26.248Z
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: Yes

@swatDong swatDong added the bug Issue identified by VS Code Team member as probable bug label May 18, 2023
@connor4312
Copy link
Member

This is because Teams apparently publishes with sourcemaps, so the debugger tries to load all sourcemaps for the UI, e.g. for "https://statics.teams.cdn.office.net/hashed/3.3-app.min-7ab89a4.js".

A solution would be an option to control where sourcemaps get loaded from, or an ignore pattern for sourcemaps, in the launch.json. PR's welcome.

@connor4312 connor4312 added feature-request Request for new features or functionality and removed bug Issue identified by VS Code Team member as probable bug labels Jun 6, 2023
@connor4312 connor4312 changed the title Breakpoint slows down the whole browser Add an allowlist/denylist for browser sourcemap locations Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants