unisonweb / vscode-unison

Official Unison extension for Visual Studio Code
MIT License
23 stars 4 forks source link

Add log output #5

Closed jneira closed 1 year ago

jneira commented 1 year ago

Hi! trying to debug the use of the extension in windows i've added some log output. I think it can be useful to help users investogate the cause of errors and report them. As the extension is trying to connect indefinitely, tries will be appended also continuosly, but i think it is good give some signal the extension is doing it

npm has upgraded typescript version automatically, i can remove that commit if you think it should not br included in this pr.

Output example of a failing attempt in my windows 10:

Activating unison language server at d:\dev\ws\unison\learn
Trying to connect to ucm lsp server at 127.0.0.1:5757
Language server failed to connect, cause: Error: connect ECONNREFUSED 127.0.0.1:5757
Trying to connect to ucm lsp server at 127.0.0.1:5757
Language server failed to connect, cause: Error: connect ECONNREFUSED 127.0.0.1:5757
Trying to connect to ucm lsp server at 127.0.0.1:5757
Language server failed to connect, cause: Error: connect ECONNREFUSED 127.0.0.1:5757
Trying to connect to ucm lsp server at 127.0.0.1:5757
Language server failed to connect, cause: Error: connect ECONNREFUSED 127.0.0.1:5757
Trying to connect to ucm lsp server at 127.0.0.1:5757
Language server failed to connect, cause: Error: connect ECONNREFUSED 127.0.0.1:5757
Trying to connect to ucm lsp server at 127.0.0.1:5757
....
ChrisPenner commented 1 year ago

Seems helpful šŸ‘šŸ¼

Thanks for the contribution!