Skip to content

Error when trying to set a breakpoint in index.html #1028

@rinselmann

Description

@rinselmann

Describe the bug
When I try to set a breakpoint in a project that contains only an index.html file served from the filesystem, I get the following error: Error processing setBreakpoints: SyntaxError: Invalid regular expression

To Reproduce
Steps to reproduce the behavior:

  1. Create new vscode project containing an index.html file with a script block
  2. Create a launch configuration to open the index.html file using path
  3. Start a debugging session
  4. Try to set a breakpoint in index.html
  5. See Error

VS Code Version: 1.56.2

Additional context
I believe this is due to urlToRegex incorrectly handling paths that are partially pre-escaped, which happens if the path ends with index.html. I have a fix that I'm planning on submitting a pull request for.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions