支持断点/调试的Powershell主机 [英] Powershell Host that supports breakpoints/debugging

查看:57
本文介绍了支持断点/调试的Powershell主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Powershell中创建支持断点/调试的PSHost?
是否需要为此实现特殊功能?

How can I create a PSHost that supports breakpoints/debugging in Powershell? Are there special functions I need to implement for that?

推荐答案

System.Management。 Automation.Runspaces.Runspace 包含属性调试器
向其事件 DebuggerStop 添加一个处理程序,并在您的主机中处理这些事件。

System.Management.Automation.Runspaces.Runspace contains the property Debugger. Add a handler to its event DebuggerStop and process these events in your host.

这篇关于支持断点/调试的Powershell主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆