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

Add doc for printing LSP server logs #19

Open
PrimeTimeTran opened this issue Jun 11, 2024 · 1 comment
Open

Add doc for printing LSP server logs #19

PrimeTimeTran opened this issue Jun 11, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@PrimeTimeTran
Copy link

demo
I'm working on getting a handle on logging so implement features like list suggestions, next suggestion, select suggestions, etc.

I've got LSP-AI working on my local & can start the extension and generate a response as well as confirm the generation.

I set LSP_AI_LOG=DEBUG before running app.

However I haven't gotten a handle on how to print LSP server logs.

Can we add doc explaining that?

@SilasMarvin
Copy link
Owner

Logs can be printed from the server using the eprintln!() macro. Where those logs end up is dependent on what editor you are using. In VS Code, those logs end up in the Output tab of your terminal, make sure to select the lsp-ai dropdown.

If you want to print logs from the VS Code plugin, you can print them with console.log to see these logs, make sure you are are running VS Code in Debug mode and open the developer console.

If you open the lsp-ai repository in VS Code, there is an option in the Debug tab to run in Debug because we defined a .vscode directory with some tasks.

Let me know if this is helpful! You are right, we should add a contributing guide with this info.

@SilasMarvin SilasMarvin added the documentation Improvements or additions to documentation label Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants