microsoft / testfx

MSTest framework and adapter
MIT License
679 stars 246 forks source link

Expose the PID int the server initialization response #3211

Closed drognanar closed 3 days ago

drognanar commented 3 days ago

If the initialize response included a PID, then the client's could grab the process handle, even in scenarios where the client does not directly create the server process.

The request response could look as follows:

internal record InitializeRequestArgs(int ProcessId, ClientInfo ClientInfo, ClientCapabilities Capabilities);
internal record InitializeResponseArgs(int? ProcessId, ServerInfo ServerInfo, ServerCapabilities Capabilities);

This for instance could allow the client to auto attach during debugging to the RPC process, without the need for an explicit client/attachDebugger RPC call.