Visual Studio Remote Debugging Extensibility
Asked Answered
I

1

3

I'm trying to attach to a remote machine with code similar to the following:

Debugger2 db (Debugger2)dte.Debugger;
Transport trans = db.Transports.Item("Default");
Process2 proc2 = (Process2)db.GetProcesses(trans, "MACHINENAME").Item("SERVICENAME");
proc2.Attach2();

I've gotten it to work by logging on through remote desktop and manually starting the debugger, but I have to stay logged in. The problem is, I don't want to stay logged into the remote machine. Is there a way to automatically launch the debugger, similar to what happens when I attach through the IDE?

Intermolecular answered 7/11, 2008 at 15:29 Comment(0)
R
1

You could wrap your debugging code as a Windows service that executes at startup with hightened privileges.

However, I don't recommend that route, because based on experience I think it's over-kill for what is most likely needed. Could you expand on why you want to attach a debugger to a remote process automatically?

My guess is that you want to do something that would be best suited for WinDbg. Something similar to these.

But, without more background information on what you are trying to accomplish, I'm obviously just guessing.

Recipience answered 25/11, 2008 at 1:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.