Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to debug json communications #6

Open
albfan opened this issue Apr 22, 2020 · 6 comments · May be fixed by #7
Open

How to debug json communications #6

albfan opened this issue Apr 22, 2020 · 6 comments · May be fixed by #7
Labels
question Further information is requested

Comments

@albfan
Copy link

albfan commented Apr 22, 2020

Is it possible to log somewhere the json request and responses from visual studio code and vala-language-server?

JSONRPC_DEBUG or similar. I'm totally newbie to visual studio code so it can be an obvious question only not obvious to me

@Prince781
Copy link
Member

You'd have to clone, then compile this plugin, then run it in debug mode (hit F5).

@Prince781 Prince781 added the question Further information is requested label Apr 22, 2020
@albfan
Copy link
Author

albfan commented Apr 22, 2020

Something like https://code.visualstudio.com/api/get-started/your-first-extension

After clone this, run code ./vala-vscode and press F5 I'm not sure where I would see those communications.

I' looking for something that runs the language server like:

JSONRPC_DEBUG=1 vala-language-server &> ~/vscode-ls.log

or similar.

Can we add config for that to the plugin?

@benwaffle
Copy link
Member

You have to go to the output tab

@albfan
Copy link
Author

albfan commented Apr 22, 2020

I think that's for vala-language-server itself. That might or might not include json communications (gvls do not include, vala-language-server seems to do it)

Seems it needs to add vala.trace.server property https://code.visualstudio.com/api/language-extensions/language-server-extension-guide.

So not really related with this I guess, thanks

@albfan albfan closed this as completed Apr 22, 2020
@benwaffle
Copy link
Member

these are both sides of the same coin. JSONRPC_DEBUG=1 will make VLS log the JSON messages. vala.trace.server will make VSCode log the JSON messages

@albfan albfan reopened this Apr 22, 2020
@albfan
Copy link
Author

albfan commented Apr 22, 2020

@benwaffle after look into it, yes that needs to be fixed here. Force to always log json messages with JSONRPC_DEBUG could hide your messages if you want to see server logs, so I open #7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants