microsoft / microsoft/vscode-js-debug

Support local overrides with in-editor debugging

Open
#2,079 3 comments 0 reactions 1 assignee View on GitHub

@connor4312 is already working on this.

Since Sep 9, 2024.

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

Description

Is your feature request related to a problem? Please describe.

I'm a front-end developer working on a live website, and don't have access to the back-end nor ability to work locally. To ease testing, I'm using chrome's local overrides feature. I would like to also use vscode in-editor debugging feature, so I don't have to switch windows to add a breakpoint or a logpoint.

Issue / Current behavior : When I add a breakpoint, the file open in the editor is a copied read-only file from the debugger, and not the local file.

Describe the feature you'd like

Ability to add local overrides from the extension. Adding a breakpoint in the local file adds it in the mocked remote resource. When the execution is paused, I would like to be able to edit the opened file.

I'm not expecting the changes to also hot-update the file. As long as I can add breakpoints, edit the file and save locally + reload live website, it's fine. But it could be a nice addition too.

Appendices

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "chrome",
            "request": "launch",
            "name": "Debug live on VsCode",
            "url": "https://live-website.example.com/",
            "webRoot": "${workspaceFolder}/live-website.example.com",
            "userDataDir": false
        }
    ]
}

Related question : https://stackoverflow.com/questions/62921375/can-i-use-chrome-debugger-with-a-live-website-and-local-overrides

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.