firefox-devtools / firefox-devtools/vscode-firefox-debug

cannot add breakpoint in remote file because of URL encoding

Open Beginner friendly
#330 0 comments 0 reactions 0 assignees View on GitHub
bug path mapping
Dominant language
TypeScript
Stars
447
Forks
76
PR merge metrics
No merged PRs in 30d

Description

When adding a breakpoint for a remote file with a path that contains special characters, Firefox is not recognized to have this file loaded.

This is because the URL for the file the breakpoint is to be set in is URL-encoded, but the URLs of the files loaded by Firefox are not.
As a consequence, the target file's URL is not regarded as equal to itself by [this function](https://github.com/firefox-devtools/vscode-firefox-debug/blob/1bea96d85f02c3fd3361bcd789d258f0df99b92a/src/adapter/util/misc.ts#L10) which leads to it not being found in the list of sources.

Contributor guide

Open the contributing guide

Research direction

Start by reading the URL comparison function in src/adapter/util/misc.ts, linked from the issue, and trace how the breakpoint target is matched against Firefox's loaded source list. Reproduce the case with a remote file path containing special characters, then verify that the breakpoint recognizes the loaded file despite the URL encoding difference.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.