Skip to content

Log useful information for debugging to window/logMessage #2161

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

Open
bnbarham opened this issue May 19, 2025 · 0 comments
Open

Log useful information for debugging to window/logMessage #2161

bnbarham opened this issue May 19, 2025 · 0 comments

Comments

@bnbarham
Copy link
Contributor

It's fairly common for issues to come up that are fairly simple to diagnose through our logs, but that are not otherwise discoverable. Some examples of this are errors in finding the corresponding build system for a project (eg. invalid compile_commands.json file) and missing (or incorrect) settings for a file.

One (non-darwin) solution would be to output all our logs to stderr as well, but we can't do that on macOS with our logging implementation today (which calls directly into OSLog). It's also likely much more verbose by default than a client may expect.

Another solution could be to instead:

  1. window/logMessage the location of the detailed logs (whether console for macOS or the files otherwise)
  2. Use window/logMessage for any errors we think would be generally useful for debugging in and of themselves (possibly non-spammy messages as well)
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

No branches or pull requests

1 participant