How can I call a UiPath workflow from Powershell and run the UiPath workflow in Debug mode?
In other words, I want to run the script as though I click the UiPath Debug command, while using the exact parameters passed from the Powershell script. Any UiPath workflow breakpoints should suspend the workflow and show the UiPath Debug Gui to permit debugging.
My current Powershell script uses the sample syntax:
There could be multiple arguments that are passed into the workflow.
Note: I do NOT want to use message boxes or log entries to see the variable’s values. This is because I may want to do other things (in the immediate window) while the UiPath script is paused, and before I publish the workflow.
$wshell = New-Object -ComObject wscript.shell;
$wshell.Run("<Project main file(as in json) path>")
#using static delay as of now
Start-Sleep -s 60
#activate UiPath studio
$wshell.AppActivate('<Project Name as in json> - UiPath Studio')
Start-Sleep -s 3
#Send hotkey F6 for debug
$wshell.SendKeys('{F6}')
Thank you. Use your approach, how can I pass in a some arguments? In other words, I do not want to use the default arguments in the workflow. Instead, I want to set them in the Powershell script and pass them to the workflow. If this is possible, can you provide a sample?