microsoft / microsoft/vscode-js-debug
Extra slashes in URL can cause breakpoints to not be bound
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 373
- Avg merge
- 1d 9m
- Merged PRs (30d)
- 6
Description
Repro:
- set a breakpoint in any js/ts file
- launch the browser (but to a different url)
- navigate to the url which loads the script with the breakpoint, but add an extra slash (e.g. http://localhost:5000//index.html)
- the URL in the
scriptParsedevent 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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