I'd like to create new command line to attach Visual Studio to an application with IronPython:
My Script:
import clr
import System
from System.Runtime.InteropServices import Marshal
DTE = Marshal.GetActiveObject('VisualStudio.DTE')
curLocalProcess = DTE.Debugger.LocalProcesses
print curLocalProcess.Count
currentProc = curLocalProcess.Item(1)
currentProc.Attach()
While, I encounter a problem on Vista:
EnvironmentError: Visual Studio has insufficient privileges to debug this process.
To debug this process, Visual Studio must be run as an administrator.
I suppose it's not a issue of IronPython but about Vista Security. However, I cannot figure out a solution for this even after I run Visual Studio 2008 SP1 and IronPython as Administrator. Except that, I also turned off UAC.
I also notice that "Run this program as an administrator" in Properties - Compatibility tab for Visual Studio is grayed.
Do you have any comments or suggestions?