开发者

I cannot debug in PowerGui

开发者 https://www.devze.com 2022-12-13 09:31 出处:网络
I have PS V2 and PowerGUI (1.9.6.1027). I set a debug point in my script in PowerGUI, but I cannot get debug workin when I start debug from tool bar or menu item. I got a dialog of \"Continue with thi

I have PS V2 and PowerGUI (1.9.6.1027). I set a debug point in my script in PowerGUI, but I cannot get debug workin when I start debug from tool bar or menu item. I got a dialog of "Continue with this operation?" as caption. There are 4 options "Yes", "Yes to All", "NO" and "No to All".

Not sure if there is any thing or option I have to set in PowerGUI?

Here is the snap-shot of dialog window prompt when I tried to debug my codes: alt text http://img7.imageshack.us/img7/2792/powerguidebug.png

If I force to close the window, I got an exception in Powershell console (embedded):

An error of type "System.Management.Automation.Host.PromptingException" has occurred. Syste开发者_开发问答m.Management.Automation


Have you set your execution policy to allow for the execution of scripts? You can see your current execution policy by executing Get-ExecutionPolicy in the embedded PowerShell console in the PowerGUI Script Editor or by opening a native (blue) PowerShell console and running the command there. By default the execution policy is set to restricted and you'll have to set it to remotesigned or allsigned to run scripts.


My guess is that you are on some CTP of PowerShell 2.0. Please upgrade to the RTM version here: http://support.microsoft.com/kb/968929

0

精彩评论

暂无评论...
验证码 换一张
取 消