Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CTP3 debug commands greyed out in powershell ISE?

2,849 views
Skip to first unread message

James

unread,
Dec 26, 2008, 7:58:48 PM12/26/08
to
In the powershell ISE, I type in a few commands in the script window or load
a script, and want to step through the code, but all the debug commands are
greyed out and F11 does nothing? What do I need to do to step through code?

Marco Shaw [MVP]

unread,
Dec 26, 2008, 11:10:40 PM12/26/08
to

Go to the first line of your code, for example, do Debug->Toggle
Breakpoint, then Debug->Run/Continue.

Then your menu should come "alive"...

Marco

--
*Microsoft MVP - Admin Frameworks
https://mvp.support.microsoft.com/profile/Marco.Shaw
*Co-Author - Sams Windows PowerShell Unleashed 2nd Edition (due December
15th, 2008)
*PowerShell Co-Community Director - http://www.powershellcommunity.org
*Blog - http://marcoshaw.blogspot.com

James

unread,
Dec 26, 2008, 11:22:06 PM12/26/08
to
Thanks. Do you know of a way to enter a command line for a script in the
ISE? You can't change $args, though I guess you could edit the script to set
the args before debugging...

"Marco Shaw [MVP]" <marco.shaw@_NO_SPAM_gmail.com> wrote in message
news:%23wQ2ll9...@TK2MSFTNGP06.phx.gbl...

Bernd K

unread,
Dec 27, 2008, 3:57:19 PM12/27/08
to

Hello James,
Without any documentation about ISE
I tried the following:
1) I loaded a script containing a function into the script pane
2) I set a breakpoint to a line within that function using F9
3) I startetd the script F5
4) In the command pane I entered a call the function providing
arguments

Debugger stopped at Breakpoint red line became yellow
5) I can step using F10 or f11 or inspect some variables

looks good.

Bernd


--
Bernd K

Uncle Rico

unread,
Jan 18, 2009, 6:18:21 PM1/18/09
to
My debug commands are greyed out as well.

If I right click on the first line of a script, "Run Selection" and "Toggle
Breakpoint" are both greyed out.

Everything in the Debug menu is greyed out except "Run/Continue" and "List
Breakpoints" (both work as expected).

I have the same behavior in Vista with CTP3 and with PowerShell in Windows 7
Beta build 7000.

It sounds like some people are able to use the debugger...what is the trick?

David

bluefin

unread,
Jan 20, 2009, 6:10:02 PM1/20/09
to
While the PowerShell Teams or MVPs are looking up for solutions, why
not try the Debug function from PowerGUI Script Editor at
http://www.powergui.org/downloads.jspa

Happy debugging.

On Jan 19, 7:18 am, Uncle Rico <UncleR...@discussions.microsoft.com>
wrote:

bluefin

unread,
Jan 21, 2009, 4:59:28 AM1/21/09
to
You need to save the script first, then move cursor to first line of
the code and use Toggle Breakpoint.

Cheers.

On Jan 19, 7:18 am, Uncle Rico <UncleR...@discussions.microsoft.com>
wrote:

0 new messages