In Powershell ISE, I was able to open a function code module in the ISE, set a breakpoint, in the command line window below, dot source the function code, then run the function from the ISE command line with parameters and was able to debug the function.
I tried the same thing in VSC however it does not recognise the breakpoint when the function is run from the Terminal window. Is this possible?
My source for the module is this: https://knowledge.broadcom.com/external/article?articleNumber=370419
For some strange reason when I try with the Broadcom supplied module, my ISE crashes to the desktop, even when run as an administrator so I'm forced to use VSC.
I tried to load the module in VSC and set a breakpoint and was expecting to run the module from the VSC command line and for the code execution to stop at the breakpoint however it did not and thus I cannot debug the function code.
PS C:\Users\jmilano\Documents\PowerShell_Scripts\Bulk_License_Update-v1.0> Get-PowerCLIVersion WARNING: The cmdlet "Get-PowerCLIVersion" is deprecated. Please use the 'Get-Module' cmdlet instead.
PowerCLI Version VMware.PowerCLI 13.1.0 build 21624340 Component Versions
VMware Common PowerCLI Component 13.2 build 22643733 VMware Cis Core PowerCLI Component PowerCLI Component 13.2 build 22643734 VMware VimAutomation VICore Commands PowerCLI Component PowerCLI Component 13.1 build 21606170
PS C:\Users\jmilano\Documents\PowerShell_Scripts\Bulk_License_Update-v1.0> $PSVersionTable
Name Value
PSVersion 7.4.5 PSEdition Core GitCommitId 7.4.5 OS Microsoft Windows 10.0.20348 Platform Win32NT PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1 WSManStackVersion 3.0
PS C:\Temp> $PSVersionTable
Name Value
PSVersion 5.1.20348.2760 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.20348.2760 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1