Skip to content

Commit a56bf09

Browse files
authored
chore: add pid info for debugging (#221)
1 parent f43b491 commit a56bf09

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.vscode/launch.template.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
"${workspaceFolder}/packages/vscode-extension/dist/**/*.js"
1515
],
1616
"preLaunchTask": "npm: watch - packages/vscode-extension"
17+
},
18+
{
19+
"name": "Attach to RSlint LSP Server Process",
20+
"type": "go",
21+
"request": "attach",
22+
"mode": "local",
23+
"processId": 0
1724
}
1825
]
19-
}
26+
}

cmd/rslint/lsp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ func (s *LSPServer) Handle(ctx context.Context, conn *jsonrpc2.Conn, req *jsonrp
8282
}
8383

8484
func (s *LSPServer) handleInitialize(ctx context.Context, req *jsonrpc2.Request) (interface{}, error) {
85-
log.Printf("Handling initialize: %+v", req)
85+
log.Printf("Handling initialize: %+v with pid %d", req, os.Getpid())
8686
// Check if params is nil
8787
if req.Params == nil {
8888
return nil, &jsonrpc2.Error{

0 commit comments

Comments
 (0)