Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Set-PSDebug -Step behavior

Reply
 
Old 05-29-2006   #1 (permalink)
DBMwS


 
 

Set-PSDebug -Step behavior

After setting "Set-PSDebug -Step"

I can step through each line of code while being prompted with
[^_^]PS[114]>ls

Continue with this operation?
1+ ls
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):


In that case, if you say "A" for "Yes to All", I expected "A" to apply only
to "ls"
but for successive commands after selecting "A",
I wasn't being prompted for "Continue with this operation?".

It seems like after selecting "Yes to All", "-Step" switch seems to go off
globally
although I meant to say "Yes to All" for that current command i was stepping
through.

Is this intended by design or hmm a bug?
I don't personally care about this matter that much
but it just didn't seem intuitive enough for me since I was thinking about
setting
"-step" option thru "Set-PSDebug -Step:$false".

My System SpecsSystem Spec
Old 05-29-2006   #2 (permalink)
/\\/\\o\\/\\/


 
 

Re: Set-PSDebug -Step behavior

DBMwS wrote:
> After setting "Set-PSDebug -Step"
>
> I can step through each line of code while being prompted with
> [^_^]PS[114]>ls
>
> Continue with this operation?
> 1+ ls
> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
> (default is "Y"):
>
>
> In that case, if you say "A" for "Yes to All", I expected "A" to apply only
> to "ls"
> but for successive commands after selecting "A",
> I wasn't being prompted for "Continue with this operation?".
>
> It seems like after selecting "Yes to All", "-Step" switch seems to go off
> globally
> although I meant to say "Yes to All" for that current command i was stepping
> through.
>
> Is this intended by design or hmm a bug?
> I don't personally care about this matter that much
> but it just didn't seem intuitive enough for me since I was thinking about
> setting
> "-step" option thru "Set-PSDebug -Step:$false".


also it wil also get in debug mode so all internal functions are handled
so [a]ll is very tempting ;-)


MowPS>Set-PSDebug -off
MowPS>ls


Directory: Microsoft.


Mode LastW
....
.....

MowPS>Set-PSDebug -step
MowPS>ls

Continue with this operation?
1+ ls
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):
DEBUG: 1+ ls

Continue with this operation?
1+ $_.PSParentPath
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):
DEBUG: 1+ $_.PSParentPath

Continue with this operation?
1+ $catr = "";
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
(default is "Y"):

gr /\/\o\/\/
My System SpecsSystem Spec
Old 05-31-2006   #3 (permalink)
Bruce Payette [MSFT]


 
 

Re: Set-PSDebug -Step behavior

The current behaviour is by design. "Yes to All" is equivalent to
"Continue" - that is, stop stepping and just proceed with execution.
Unfortunately the script debugging features are pretty vestigial in V1. We
had grand plans but they've been deferred to a future release...

-bruce

--
Bruce Payette [MSFT]
Windows PowerShell Technical Lead
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.

"/\/\o\/\/" <no@spam.mow> wrote in message
news:uCNWBb1gGHA.4712@TK2MSFTNGP05.phx.gbl...
> DBMwS wrote:
>> After setting "Set-PSDebug -Step"
>>
>> I can step through each line of code while being prompted with
>> [^_^]PS[114]>ls
>>
>> Continue with this operation?
>> 1+ ls
>> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
>> (default is "Y"):
>>
>>
>> In that case, if you say "A" for "Yes to All", I expected "A" to apply
>> only to "ls"
>> but for successive commands after selecting "A", I wasn't being prompted
>> for "Continue with this operation?".
>>
>> It seems like after selecting "Yes to All", "-Step" switch seems to go
>> off globally
>> although I meant to say "Yes to All" for that current command i was
>> stepping through.
>>
>> Is this intended by design or hmm a bug?
>> I don't personally care about this matter that much but it just didn't
>> seem intuitive enough for me since I was thinking about setting "-step"
>> option thru "Set-PSDebug -Step:$false".

>
> also it wil also get in debug mode so all internal functions are handled
> so [a]ll is very tempting ;-)
>
>
> MowPS>Set-PSDebug -off
> MowPS>ls
>
>
> Directory: Microsoft.
>
>
> Mode LastW
> ...
> ....
>
> MowPS>Set-PSDebug -step
> MowPS>ls
>
> Continue with this operation?
> 1+ ls
> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
> (default is "Y"):
> DEBUG: 1+ ls
>
> Continue with this operation?
> 1+ $_.PSParentPath
> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
> (default is "Y"):
> DEBUG: 1+ $_.PSParentPath
>
> Continue with this operation?
> 1+ $catr = "";
> [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help
> (default is "Y"):
>
> gr /\/\o\/\/



My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Debugging Vista BSOD - step by step guide General Discussion
Need Step by step instructions for windows mail Vista mail
Fed up with Vista? Here are step-by-step instructions for downgrading back to the warm familiarity of Windows XP Vista General
Request for a Simple Step-By-Step Guide to Networking Vista and XP Vista networking & sharing
Request for a Simple Step-By-Step Guide to Networking Vista and XP Vista networking & sharing


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46