estruyf / vscode-remote-control

Remote Control your Visual Studio Code - This extension allows you to remotely control Visual Studio Code. Run commands from anywhere you want on your device. The extension allows you to take VSCode automation to the next level.
https://marketplace.visualstudio.com/items?itemName=eliostruyf.vscode-remote-control
MIT License
22 stars 8 forks source link

Feat: select random port if default port is already taken #4

Closed davidsneighbour closed 2 years ago

davidsneighbour commented 2 years ago

I installed the plugin globally, then opened a second VSCode instance to the following error message:

20220818-23:01:15-Selection-001

I did NOT yet configure anything. I would think the extension to use a different port, if it's impossible to use the same port for multiple instances (I expect two instances of VSCode to be two separate environment?). Maybe use a random port without configuration or a range of ports from which is selected?

I assume it would make more sense maybe, to add some form of onboarding when the extension is loaded the first time in a workspace without configuration that explains how its working and tells users to select a specific port or disable the extension in this specific workspace. I know it's hard to tell if a workspace is configured, there is folder config, workspace config, user config... but somehow the extension should help with the initial configuration tasks.

Maybe even add a note to enable this extension only per workspace and then have an onboarding form to set "conscious" values?

Ranting here, I know :) Thanks for the hard work!

PS: also the "configure locally" and "configure globally" buttons irritate me slightly... isn't global config exactly what we don't want so we DON'T have two projects use the same port?

PPS: in the farthest sense what I am trying to say is, that this should be a notification "hey, using port Y because port X is used by another VSCode instance. Go to the docs to find out how to configure this properly".

estruyf commented 2 years ago

@davidsneighbour I have implemented the changes. Now the extension will start up on a random port and will show that if the other one is already in use.

image