microsoft / live-share

Real-time collaborative development from the comfort of your favorite tools
http://aka.ms/vsls
Creative Commons Attribution 4.0 International
2.28k stars 253 forks source link

Run and debug not updating after editing the launch.json #5035

Open EliiseS opened 8 months ago

EliiseS commented 8 months ago

Describe what happened:

Changes to launch.json do not take effect for the attende when launching debugger.

What was your system configuration?

Product and Version [VS/VSCode]: VSCode 1.87.1 OS Version[macOS/Windows]: Windows Live Share Extension Version: v1.0.5918 Target Platform or Language [e.g. Node.js]: Python

Host machine is windows with wsl2 inside of a devcontainer while attendee machine is windows

Steps to Reproduce / Scenario:

The issue is almost identical as described in this other issue found here: Run and debug not updating after editing the launch.json (using wsl extension) · Issue #6154 · microsoft/vscode-remote-release

Main difference is that when I change the name of the launch configuration the UI changes, but the configuration will become unlaunchable for the attendee. The host of the session will still be able to launch the debugger. If I change any other configuration parameters, they won't show up in the debug terminal. For example:

I changed a launch config from this:

        {
            "name": "Python: Offline Eval moo",
            "type": "debugpy",
            "args": [
                "--eval_data_path",
                "${workspaceFolder}/scripts/offline-evaluation/data/eval_dataset_no_gen.jsonl"
            ],
            "request": "launch",
            "program": "${workspaceFolder}/scripts/offline-evaluation/run-offline-eval-from-lib.py",
            "envFile": "${workspaceFolder}/.github/env/dev.env"
        }

to this:

        {
            "name": "Python: Offline Eval moo",
            "type": "debugpy",
            "args": [
                "--eval_data_path",
                "${workspaceFolder}/scripts/offline-evaluation/data/eval_dataset_no.jsonl" // Changed this
            ],
            "request": "launch",
            "program": "${workspaceFolder}/scripts/dummy_file.py", // And changed this
            "envFile": "${workspaceFolder}/.github/env/dev.env"
        }

And this in the result I see in the python debugger:

 $  cd /workspaces/repo ; /usr/bin/env /workspaces/repo/.nox/dev/bin/python3.10 /root/.vscode-server/extensions/ms-python.debugpy-2024.2.0-linux-x64/bundled/libs/debugpy/adapter/../../debugpy/launcher 53315 -- /workspaces/repo/scripts/offline-evaluation/run-offline-eval-from-lib.py --eval_data_path /workspaces/repo/scripts/offline-evaluation/data/eval_dataset_no_gen.jsonl 

When host launches the debugger, the changes are there.

I can fix this problem by reloading the VSCode window and rejoining live share. Everything will work until I change the launch.json again.

Please attach logs to this issue: You can access them via the Live Share: Export Logs command from the command palette (ctrl + shift + p) and attach them to this issue logs.zip

Screenshots If applicable, add screenshots to help explain your problem.