Debugging - cannot step into where-object

Use this forum to ask questions after your subscription maintenance expires or before you buy. Need information on licensing or pricing? Questions about a trial version? This is the right place for you. No scripting questions, please.
Forum rules
DO NOT POST SUBSCRIPTION NUMBERS, LICENSE KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
salient
Posts: 8
Last visit: Wed May 12, 2021 10:22 am

Debugging - cannot step into where-object

Post by salient »

Product, version and build: PowerShell Studio 2021, Version & Build: 5.8.188 (64 Bit)
Operating system: Windows 10 Version 20H2 (OS Build 19042.928) (64 Bit)
PowerShell version(s): V5 (64 Bit)

Hello. I am trying to debug a project and noticed I cannot step into lines that use "Where-Object". The step into just repeats indefinitely and I have to step over the line. Is this normal or is there a better way to do this? Thank you.

User avatar
Alexander Riedel
Posts: 7670
Last visit: Sun May 09, 2021 11:51 am
Answers: 3
Been upvoted: 9 times

Re: Debugging - cannot step into where-object

Post by Alexander Riedel »

Assuming that you refer to "Step into" (F11) vs "Step" F10, you would generally always just single step. Step into is meant for functions. When you are stopped at a function call you can decide to just step over that call or step into the function. Step into has generally no particular meaning at a statement that is not a function.
Now, why Step into behaves weird when used at a Where-Object statement is a question for Microsoft. The low level code for the debugger is in the PowerShell engine and that is Microsoft's domain.
Alexander Riedel
SAPIEN Technologies, Inc.

salient
Posts: 8
Last visit: Wed May 12, 2021 10:22 am

Re: Debugging - cannot step into where-object

Post by salient »

Ok so step looping on a where-object statement is normal.
I guess hardcoding or editing the variables is an option to continue debugging.