Using MacOS (M2 Chip):
I've Powershell script which I need to run as Administrator (sudo).
To debug the script I need to run the script in Debug mode from the pwsh prompt --but I don't know how can I run in debug mode.
like for python we simply debug we
python3 -m pdb myscript.py
Alternatively I tried VSCode in my Macbook with Powershell extension in ISE Mode --But I am Struggling to find a way to run my script as Sudo/Administrator privilege in VSCODE
Existing PbiWorkbench (PbiWb) install detected, comparing versions...
Importing PbiWorkbench (PbiWb)...
Adding token to PbiWorkbench secure storage for future updates
Invoking PbiWb module...
OperationStopped: Must run as administrator
PS /Users/wilson>