The DBG_PROMPT command (cmdlet) interrupts script execution and displays an interactive prompt to evaluate expressions in the current script context. Typically used for inspecting current variable values, the debug prompt reoccurs until an empty input line is entered.
The command has the following syntax:
DBG_PROMPT [prompt]
Specifies a string with optional prompt to display. When using several prompts, the prompt can be used to indicate the location that triggered the interruption.
Default: "Dbg> "
Examples
Break during the last iteration of the loop:
for(i=0; i<11; i++) { if(i==10) DBG_PROMPT ? i }
Break using a custom prompt:
for(i=0; i<11; i++) { if(i==10) DBG_PROMPT "i==10> " ? i }
Copyright © 2013 CA. All rights reserved. |
|