Closed JVimes closed 4 years ago
I wrote CIBuildUtils.psm1 and want to debug it's Invoke-Build function. I expected I could with this in Launch.json:
{ "version": "0.2.0", "configurations": [ { "name": "Build launch", "type": "PowerShell", "request": "launch", "script": "ipmo -force ${workspaceFolder}\\CIBuildUtils.psm1; Invoke-Build", "cwd": "${workspaceFolder}" }, ] }
But when I hit F5 on that .psm1 file, I get:
PS> c:\Users\user\OneDrive\Work Documents\user\CIBuildUtils\CIBuildUtils.psm1 Cannot run a document in the middle of a pipeline: C:\Users\user\OneDrive\Work Documents\user\CIBuildUtils\CIBuildUtils.psm1. At line:0 char:0 PS>
DebugAdapter.log EditorServices.log Start-EditorServices-EditorServices.log vscode-powershell.log
Just realized "script" isn't an in-line script. Closing.
Issue Description
I wrote CIBuildUtils.psm1 and want to debug it's Invoke-Build function. I expected I could with this in Launch.json:
But when I hit F5 on that .psm1 file, I get:
Attached Logs
DebugAdapter.log EditorServices.log Start-EditorServices-EditorServices.log vscode-powershell.log
Environment Information
Visual Studio Code
PowerShell Information
Visual Studio Code Extensions
Visual Studio Code Extensions(Click to Expand)
|Extension|Author|Version| |---|---|---| |code-spell-checker|streetsidesoftware|1.7.20| |csharp|ms-vscode|1.21.7| |git-graph|mhutchie|1.18.0| |markdown-all-in-one|yzhang|2.5.1| |powershell-preview|ms-vscode|2019.11.0| |prettier-plus|svipas|3.4.0| |vscode-docker|ms-azuretools|0.8.2| |vscode-graphql|Prisma|0.2.2| |xml|DotJoshJohnson|2.5.0|