I am experiencing a problem with conditional breakpoints not working in remote sessions.
To reproduce:
Enter-PSSession -ComputerName srv01
psedit C:\temp\demo.ps1
Set a conditional breakpoint such as $i -eq 42
Run script (F5)
The following message is present when the script is running:
[SRV01]: PS C:\Users\admin\Documents> Cannot bind parameter 'Action'. Cannot convert the "if ($i -eq 14) { break }" value of type "System.String" to type "System.Management.Automation.ScriptBlock".
At line:0 char:0
The same conditional breakpoint works fine when running the same script locally.
Issue Description
I am experiencing a problem with conditional breakpoints not working in remote sessions.
To reproduce: Enter-PSSession -ComputerName srv01
psedit C:\temp\demo.ps1
Set a conditional breakpoint such as $i -eq 42 Run script (F5)
The following message is present when the script is running:
The same conditional breakpoint works fine when running the same script locally.
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
|Extension|Author|Version| |---|---|---| |azure-account|ms-vscode|0.8.7| |azure-pipelines|ms-azure-devops|1.157.4| |azurecli|ms-vscode|0.4.6| |azurerm-vscode-tools|msazurermtools|0.8.2| |bracket-pair-colorizer-2|CoenraadS|0.0.28| |code-settings-sync|Shan|3.4.3| |gitblame|waderyan|3.0.1| |githistory|donjayamanne|0.4.6| |gitlens|eamodio|10.1.2| |guides|spywhere|0.9.3| |indent-rainbow|oderwat|7.4.0| |markdown-all-in-one|yzhang|2.5.1| |material-icon-theme|PKief|3.9.1| |night-owl|sdras|1.1.3| |powershell-preview|ms-vscode|2019.11.0| |python|ms-python|2019.10.44104| |rainbow-csv|mechatroner|1.3.1| |remote-containers|ms-vscode-remote|0.83.0| |remote-wsl|ms-vscode-remote|0.40.2| |shell-launcher|Tyriar|0.3.0| |swagger-viewer|Arjun|2.2.2| |team|ms-vsts|1.161.0| |terraform|mauve|1.4.0| |vscode-azureappservice|ms-azuretools|0.16.1| |vscode-azurefunctions|ms-azuretools|0.20.0| |vscode-azurestorage|ms-azuretools|0.7.2| |vscode-azureterraform|ms-azuretools|0.3.0| |vscode-coverage-gutters|ryanluker|2.4.2| |vscode-instant-markdown|dbankier|1.4.4| |vscode-logicapps|ms-azuretools|0.2.22| |vscode-markdownlint|DavidAnson|0.31.2| |vscode-pandoc|DougFinke|0.0.8| |vscode-peacock|johnpapa|3.2.0| |vscode-todo-highlight|wayou|1.0.4| |vsliveshare|ms-vsliveshare|1.0.1123|