Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 如何在NuGet Package Manager控制台中获取IVsDebugger对象?_Powershell_Visual Studio 2012_Automation_Nuget - Fatal编程技术网

Powershell 如何在NuGet Package Manager控制台中获取IVsDebugger对象?

Powershell 如何在NuGet Package Manager控制台中获取IVsDebugger对象?,powershell,visual-studio-2012,automation,nuget,Powershell,Visual Studio 2012,Automation,Nuget,如何在NuGet Package Manager控制台中获取IVsDebugger对象?我想自动化远程调试操作 我非常想念那些宏-(好吧,这是C#,不是PowerShell,但我会将其转换为PowerShell,然后试用。谢谢 Debugger debugger = _applicationObject.Debugger; DTE dte = debugger.DTE; ServiceProvider serviceProvider = new ServiceProvider((IServi

如何在
NuGet Package Manager控制台中获取
IVsDebugger
对象?我想自动化远程调试操作

我非常想念那些宏-(

好吧,这是
C#
,不是
PowerShell
,但我会将其转换为
PowerShell
,然后试用。谢谢
Debugger debugger = _applicationObject.Debugger;

DTE dte = debugger.DTE;

ServiceProvider serviceProvider = new ServiceProvider((IServiceProvider)dte);

IVsDebugger dbg = (IVsDebugger)serviceProvider.GetService(typeof(SVsShellDebugger));