This repository was archived by the owner on Nov 21, 2025. It is now read-only.
Commit eac118a
feat: enable tracing of LSP messages and payload
This commit adds a new configuration `angular.trace.server` to enable tracing
of the messages sent between the LSP client and LSP server.
This configuration is not used by Angular itself. Rather, it's read by the
`vscode-languageclient` package. See
https://github.com/microsoft/vscode-languageserver-node/blob/adb52f1276291b5bf8eaa97e053db8bb699b6872/client/src/common/client.ts#L3431
Once enabled, the request name, request duration, and optionally the request
payload will be logged to the Output console in vscode.
Example log:
```
[Trace - 3:58:03 PM] Received notification 'window/logMessage'.
[Trace - 3:58:03 PM] Received response 'initialize - (0)' in 777ms.
[Trace - 3:58:03 PM] Sending notification 'initialized'.
[Trace - 3:58:03 PM] Sending notification 'textDocument/didOpen'.
[Trace - 3:58:03 PM] Received notification 'angular/projectLoadingStart'.
[Trace - 3:58:08 PM] Received notification 'angular/projectLoadingFinish'.
[Trace - 3:58:09 PM] Received notification '$/progress'.
[Trace - 3:58:09 PM] Received notification 'window/logMessage'.
[Trace - 3:58:10 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 3:58:14 PM] Sending request 'textDocument/hover - (2)'.
[Trace - 3:58:14 PM] Received response 'textDocument/hover - (2)' in 39ms.
[Trace - 3:58:15 PM] Sending request 'textDocument/definition - (3)'.
[Trace - 3:58:15 PM] Received response 'textDocument/definition - (3)' in 3ms.
[Trace - 3:58:15 PM] Sending notification 'textDocument/didOpen'.
[Trace - 3:58:15 PM] Received notification 'textDocument/publishDiagnostics'.
[Trace - 3:58:16 PM] Sending notification 'textDocument/didClose'.
[Trace - 3:58:17 PM] Sending request 'textDocument/hover - (4)'.
[Trace - 3:58:17 PM] Received response 'textDocument/hover - (4)' in 13ms.
```1 parent b470c9c commit eac118a
2 files changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
59 | 70 | | |
60 | 71 | | |
61 | 72 | | |
| |||
0 commit comments