microsoft / microsoft/vscode-js-debug

Extra slashes in URL can cause breakpoints to not be bound

Open
#519 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
2k
Forks
373
Avg merge
1d 9m
Merged PRs (30d)
6

Description

Repro:

  1. set a breakpoint in any js/ts file
  2. launch the browser (but to a different url)
  3. navigate to the url which loads the script with the breakpoint, but add an extra slash (e.g. http://localhost:5000//index.html)
  4. the URL in the scriptParsed event will have the double slash, and the URL Regex on the breakpoint set will not match

If you unset and re-set the breakpoint after navigating to the url with the double slash, the breakpoint will be bound and hit properly.

We noticed this in one of our tests which happened to have a double slash in the URL by accident, and was passing on V1, but failing on V3.

logs: vscode-chrome-debug.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with a JavaScript or TypeScript breakpoint, then navigate to a URL containing an extra slash and compare the scriptParsed URL with the breakpoint URL Regex. Use the attached vscode-chrome-debug.txt logs as context; done means the existing breakpoint binds and is hit without unsetting and resetting it.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.