microsoft / microsoft/vscode-livepreview
Changing the port breaks reloading
Open
@andreamah is already working on this.
Since Dec 8, 2022.
bug
- Dominant language
- TypeScript
- Stars
- 596
- Forks
- 119
- Avg merge
- 1d 4m
- Merged PRs (30d)
- 5
Description
After modifying the port number from 81 to 80, the page spits out an error:
___vscode_livepreview_injected_script:28 WebSocket connection to 'ws://127.0.0.1:81/' failed
Reproducible Steps:
- Change the "Live Preview: Port Number" option from
81to80 - Start the server
- Open the page externally (I'm using the Brave Browser)
- An error should appear in DevTools' console
Expected Behaviour:
I expected the websocket connection to point to the new port number of 80, but it still attempts to connect to 81
Suspect Code:
Line 27 & 28 of ___vscode_livepreview_injected_script:
function onLoad() {
let connection = new WebSocket('ws://127.0.0.1:81');
I do not know what writes these values, otherwise I'd write a PR.
Images:


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.
Assessment
This issue has not been assessed yet.