2

I create a new file in powershell ISE, it's run perfectly but I face  a bit issue I can't add break point

Am I doing things wrongly !?

1
  • Are you using F9 to Add breakpoints? Also please make sure that you have saved your script to be able to add a breakpoint and debug your script? Commented May 11, 2017 at 12:32

2 Answers 2

3

I think you didn't save your script till now. so You should first save your file to be able to set a breakpoint.

Note: You can set three types of breakpoints using (F9) in the Windows PowerShell debugging environment:

  • Line breakpoint. The script pauses when the designated line is reached during the operation of the script

  • Variable breakpoint. The script pauses whenever the designated variable’s value changes.

  • Command breakpoint. The script pauses whenever the designated command is about to be run during the operation of the script. It can include parameters to further filter the breakpoint to only the operation you want. The command can also be a function you created.

For more details check How to Debug Scripts in Windows PowerShell ISE

0
2

Using Windows powershell ISE, you can debug the powershell scripts. Windows Powershell ISE tool come along with the installation of windows server 2012.

To debug the script select the line of code where you want to place the breakpoint and then go to "Debug" menu option and click on "Toggle BreakPoint" or F9. This will add the breakpoint. - When you execute the script by pressing F5 keyword, once it hits the breakpoint you can debug the scripts

Msdn Reference Link How to Debug Scripts in Windows PowerShell ISE

and How to debug powershell scripts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.