Bug 499710 - Documentation on how to debug Kate LSP Plugin is wrong
Summary: Documentation on how to debug Kate LSP Plugin is wrong
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: macOS (DMG) macOS
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-02-09 04:07 UTC by David Helkowski
Modified: 2025-02-12 11:05 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Helkowski 2025-02-09 04:07:52 UTC
SUMMARY
Debugging information about the Kate LSP Client is inaccurate and/or not useful.
See https://docs.kde.org/stable5/en/kate/kate/kate-application-plugin-lspclient.html
The end of the document says to use "QT_LOGGING_RULES=katelspclientplugin=true" env to debug.
That doesn't seem to do anything and/or seems to be useless.

I looked at the source code for the kate lsp plugin.
Here: https://github.com/KDE/kate/blob/master/addons/lspclient/lspclientplugin.cpp

Specifically line 54: https://github.com/KDE/kate/blob/master/addons/lspclient/lspclientplugin.cpp#L54C58-L54C73
Shows the proper debug env var is "LSPCLIENT_DEBUG=1".
This should be mentioned in the debug information in the docs and the other thing should be removed.


STEPS TO REPRODUCE
1. Try to debug lsp plugin somehow.
2. Add documented env var.

OBSERVED RESULT
Nothing useful occurs. No debugging info on CLI.

EXPECTED RESULT
Debugging information appears.

SOFTWARE/OS VERSIONS
macOS: Sequoia
Kate: DMG
Comment 1 David Helkowski 2025-02-09 04:09:37 UTC
Documentation mentioned found here in the source: https://github.com/KDE/kate/blob/a5f4a01d2cf61ef2abc5c45be7f580ed2d10e062/doc/kate/plugins.docbook#L2906
Comment 2 David Helkowski 2025-02-09 04:17:41 UTC
I wanted debug information as there didn't seem to be any output or way to find out what happened when the lsp fails to start.

Looking at the code it appears that if the lsp server fails to start it is just ignored:
https://github.com/KDE/kate/blob/master/addons/lspclient/lspclientserver.cpp#L1735

This should definitely output an error, and it isn't useful to hide such an error by default.
Comment 3 Waqar Ahmed 2025-02-12 11:05:49 UTC
Git commit a2dd6f00bc8e2ee3c5b4c7e2551a649a257c25e2 by Waqar Ahmed.
Committed on 12/02/2025 at 11:05.
Pushed by waqar into branch 'master'.

Fix lsp debug var docs

M  +1    -1    doc/kate/plugins.docbook

https://invent.kde.org/utilities/kate/-/commit/a2dd6f00bc8e2ee3c5b4c7e2551a649a257c25e2