Skip to content

debug: improve some logging bits #3713

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

Merged
merged 4 commits into from
Jun 21, 2025
Merged

Conversation

bhcleek
Copy link
Collaborator

@bhcleek bhcleek commented May 26, 2025

debug: refactor logging

Refactor logging to support logging all messages, even those that
precede availability for the GODEBUG_OUTPUT window.

Use functions instead of normal mode commands to manage the log window.

debug: fix off by one error in request ids

Start tracking the id on requests start at 1 instead of 2 by
initializing the value to 0; it's incremented before set on outgoing
requests.

debug: avoid cleanup errors

Do not attempt to delete a command based on the first line of output
from ":command GoDebug" trying to stop debugging. The error was causing
the function to be aborted, which was in turn causing Neovim to hang
when trying to quit.

Similarly, swallow exceptions when removing commands and mappings.

debug: do not reschedule log timer when stopping

@bhcleek bhcleek added this to the vim-go v1.30 milestone May 26, 2025
@bhcleek bhcleek force-pushed the debug/improvement branch from ae7bed2 to b1da2b4 Compare May 26, 2025 17:13
bhcleek added 2 commits June 19, 2025 15:47
Refactor logging to support logging all messages, even those that
precede availability for the __GODEBUG_OUTPUT__ window.

Use functions instead of normal mode commands to manage the log window.
Start tracking the id on requests start at 1 instead of 2 by
initializing the value to 0; it's incremented before set on outgoing
requests.
@bhcleek bhcleek force-pushed the debug/improvement branch from b1da2b4 to 98c7803 Compare June 19, 2025 22:48
bhcleek added 2 commits June 21, 2025 14:14
Do not attempt to delete a command based on the first line of output
from ":command GoDebug" trying to stop debugging. The error was causing
the function to be aborted, which was in turn causing Neovim to hang
when trying to quit.

Similarly, swallow exceptions when removing commands and mappings.
@bhcleek bhcleek force-pushed the debug/improvement branch from 49f1afb to d2ed711 Compare June 21, 2025 21:18
@bhcleek bhcleek merged commit e6788d1 into fatih:master Jun 21, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant