How do I debug function in Module project?

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 7 years and 11 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.
User avatar
artisticcheese
Posts: 12
Last visit: Mon Sep 12, 2016 9:21 am

How do I debug function in Module project?

Post by artisticcheese »

Powershell studio 2016

I created module project and added some scripts into it. I need to debug individual scripts without running entire module. How do I do that? I put breakpoints into functions but those are not being called if I run "Debug".
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: How do I debug function in Module project?

Post by davidc »

To debug an individual file that is part of a project, right click on the file's tab or the file's node in the Project Panel and select the Debug from the context menu:
Debug File - File Tab Menu.png
Debug File - File Tab Menu.png (19.56 KiB) Viewed 1762 times
Project File Context Menu.png
Project File Context Menu.png (19.9 KiB) Viewed 1762 times
Alternatively, you can open the file without opening the project.

David
David
SAPIEN Technologies, Inc.
User avatar
artisticcheese
Posts: 12
Last visit: Mon Sep 12, 2016 9:21 am

Re: How do I debug function in Module project?

Post by artisticcheese »

How do I call the function without calling it explicitly below Function itself. I assumed I can dotsource script once in console, then out a breakpoint and then call "Debug" on that script but it does not work.
This topic is 7 years and 11 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.