in src/csharp/MonoDebugSession.cs [400:429]
public override void Attach(Response response, dynamic args)
{
_attachMode = true;
SetExceptionBreakpoints(args.__exceptionOptions);
// validate argument 'address'
var host = getString(args, "address");
if (host == null) {
SendErrorResponse(response, 3007, "Property 'address' is missing or empty.");
return;
}
// validate argument 'port'
var port = getInt(args, "port", -1);
if (port == -1) {
SendErrorResponse(response, 3008, "Property 'port' is missing.");
return;
}
IPAddress address = Utilities.ResolveIPAddress(host);
if (address == null) {
SendErrorResponse(response, 3013, "Invalid address '{address}'.", new { address = address });
return;
}
Connect(address, port);
SendResponse(response);
}