Skip to content

Log useful information for debugging to window/logMessage #2161

Open
@bnbarham

Description

@bnbarham

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions