Unable to debug powershell scripts post Upgrade of Octopus with version 2020.4.2

Hi,
I want to raise an issue as we are unable to debug powershell scripts on a remote machine since we upgraded to version 2020.4.2.

Steps:
Octopus.Action.PowerShell.DebugMode is Set to True.
Then create the release in Octopus.
Navigate to the logs of deployment execution, you should be able to see the Hostprocess and runspace details to attach PowerShell ISE to allow debug.
RDP the target server, Open PowerShell ISE and enter the HostProcess and runcpace details.

Before the upgrade, it used to get in the script which we are intended to debug, with post deployment we see the script been getting executed but not allowed to debug. It allows to debug only the Bootstrap powershell scripts.

Is this a known issue?
And as I mentioned this worked fine before we upgraded to 2020.4.2.

Kind Regards,
Micheál Power

Hi Micheál,

Thank you for your question about debugging PowerShell scripts.

I’ve just attempted this on Octopus 2020.4.2 and I can confirm that it still works as expected. However, you are no longer dropped right at the script, you have to ‘step into’ (F11) a few more positions before it gets to that point. I’ve attached a screenshot below showing an example of what this looks like:

Could you please try the above and advise if you get to the script eventually? If that doesn’t work could you please attach a screenshot showing what you see so we can investigate further.

Best Regards,

Charles

1 Like