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.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
b_warren
Posts: 11
Last visit: Tue Jan 09, 2024 9:48 am

Debugging - cannot step into where-object

Post by b_warren »

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: 8472
Last visit: Mon Mar 18, 2024 2:59 pm
Answers: 19
Been upvoted: 37 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.
b_warren
Posts: 11
Last visit: Tue Jan 09, 2024 9:48 am

Re: Debugging - cannot step into where-object

Post by b_warren »

Ok so step looping on a where-object statement is normal.
I guess hardcoding or editing the variables is an option to continue debugging.
This topic is 2 years and 10 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.