Code Folding in VSCode using the Devolutions PowerShell Universal Extension 2026.3.3 is not working.
Collapsing code using the pop out arrows at the side of the code, or the ctrl-k ctrl-1 shortcut to collapse all functions down is not working in the last several versions of the extension.
Code folding is working correctly for PowerShell files accessed from the local computer, but not through the Devolutions connection.
I have a rather large script 13,000 lines long, this makes it quite a task to scroll through and find the right section without folding!
Please help!
Hello Finn,
Thank you for the clear description.
We reproduced the issue on our side.
When a script is opened through the PowerShell Universal connection in VS Code, the folding arrows are missing, and Ctrl+K Ctrl+1 does nothing.
The same script folds normally when it is opened from a local folder, which matches what you see.
I have reported it to our development team.
I will let you know as soon as a fix is planned.
Best regards,
Patrick Ouimet
Observation
It appears that if both VSCode extensions are enabled:
Devolutions PowerShell Universal
PowerShell
Code folding does not work.
If you disable the extension:
PowerShell
Code folding does work, but you lose many PowerShell module features such as Intelisense and code-snippets etc.
Question
Is this a conflict between both VSCode extensions?
Hello Finn,
Thank you for narrowing this down, your test pointed us straight at the cause.
Yes, this is an interaction between the two extensions, and the fix belongs on our side, in the PowerShell Universal extension.
We reproduced the issue and confirmed what causes it.
For files opened through the PowerShell Universal connection, our extension asks the Microsoft PowerShell extension to work out the folding regions.
That hand-off currently returns no regions, so VS Code shows no folding arrows.
When the Microsoft extension is disabled, our extension skips that step and VS Code uses its standard indentation-based folding instead.
That is why folding works in your separate profile.
I have reported it to our development team (ticket PSU-1619, for internal reference only).
Updating the extension to 2026.3.4 will not change this, since the folding code is the same in that version.
In the meantime, you have two options.
Your separate profile works well for editing.
Please note that it has none of the Microsoft PowerShell extension features, such as attaching the debugger to PowerShell Universal runspaces.
Or if you prefer to keep both extensions in one profile, add this to your VS Code settings.json:
"[powershell]": {
"editor.foldingStrategy": "indentation"
}
We tested it with both extensions enabled, and the folding arrows and Fold All work again on PowerShell Universal files.
It also applies to your local PowerShell files, which will then fold by indentation instead of by syntax.
You can find more details on folding options here: https://code.visualstudio.com/docs/editing/codebasics#_folding
I will update you as soon as a fix is planned.
Best regards,
Patrick Ouimet