This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules DO NOT POST LICENSE NUMBERS, ACTIVATION 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.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 4 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.
We have a holiday here, so the team is not in. As such there is some guesswork here on my path, just to be clear.
Assuming you actually have the dot sourced files open to set the breakpoints, I would assume that PowerShell Studio only sets breakpoints for files it considers 'associated' with your main script. (That part I need to verify with the team)
Since you are not dot sourcing a path but a variable, PowerShell Studio probably ignores it.
It has no idea what value (or values) $AddScript will have once a script is executed. Breakpoints are set before the script is executed.
So even IF it would by static analysis recognize that you dot source a variable, Set-PSBreakPoint -script $AddScript -line 799
has no meaning whatsoever, since $AddScript is empty at that time.
What you want would require the script to be executed once before it gets debugged to pre-set the variables.
This topic is 4 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.