File tree 1 file changed +5
-0
lines changed 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,11 @@ package struct NonDarwinLogger: Sendable {
346
346
// sourcekitd response). 10.000 characters was chosen because it seems to fit the result of most sourcekitd
347
347
// responses that are not generated interface or global completion results (which are a lot bigger).
348
348
var message = message ( ) . value. string ( for: self . privacyLevel)
349
+
350
+ // In addition to writing to the log file, also log to stderr, so LSP output is visible in the editor
351
+ // (e.g. VS Code's Output panel).
352
+ fputs ( message + " \n " , stderr)
353
+
349
354
if message. utf8. count > 10_000 {
350
355
// Check for UTF-8 byte length first because that's faster since it doesn't need to count UTF-8 characters.
351
356
// Truncate using `.prefix` to avoid cutting of in the middle of a UTF-8 multi-byte character.
You can’t perform that action at this time.
0 commit comments