vs-openapi-designer icon indicating copy to clipboard operation
vs-openapi-designer copied to clipboard

Inform a user about port binding failure

Open m1kola opened this issue 5 years ago • 0 comments

First of all thank you for the extension - I recently discovered it and it works very well.

I have a suggestion about how to make the extension to be more user-friendly.

9005 is currently a default port for the extension and I had something listening on it when I first tried the extension. I saw a blank screen instead of a preview tab and was a bit puzzled by it, because currently when the extension fails to bind to a port it fails silently and leaves a user without a clue:

https://github.com/philosowaffle/vs-openapi-designer/blob/81722dec59bef2a379fe1197bce969829dfd872f/src/extension.js#L20

I would add an error message explaining what happened and suggesting to change the port using the openApiDesigner.defaultPort setting.

m1kola avatar Mar 17 '19 00:03 m1kola