SSPowerShellBoilerplate/vscode/launch.json

{
    "version": "0.2.0",
    "configurations": [
<%
$return = @()
if ($PLASTER_PARAM_SourceType -contains 'CSharp') {
$return += ' {
            "name": ".NET Core Launch (console)",
            "type": "clr",
            "request": "launch",
            "preLaunchTask": "Build",
            "program": "powershell",
            "args": [
                "-NoExit",
                ". ${workspaceRoot}/debugHarness.ps1"],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false,
            "console": "externalTerminal"
        }'
}

if ($PLASTER_PARAM_SourceType -contains 'PowerShell') {
$return += ' {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell debugHarness (Temporary Console)",
            "script": "${workspaceRoot}/debugHarness.ps1",
            "args": [],
            "cwd":"${workspaceRoot}",
            "createTemporaryIntegratedConsole": true
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell debugHarness",
            "script": "${workspaceRoot}/debugHarness.ps1",
            "args": [],
            "cwd":"${workspaceRoot}"
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File",
            "script": "${file}",
            "args": [],
            "cwd": "${file}"
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File in Temporary Console",
            "script": "${file}",
            "args": [],
            "cwd": "${file}",
            "createTemporaryIntegratedConsole": true
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Launch Current File w/Args Prompt",
            "script": "${file}",
            "args": [
                "${command:SpecifyScriptArgs}"
            ],
            "cwd": "${file}"
        },
        {
            "type": "PowerShell",
            "request": "attach",
            "name": "PowerShell Attach to Host Process",
            "processId": "${command:PickPSHostProcess}",
            "runspaceId": 1
        },
        {
            "type": "PowerShell",
            "request": "launch",
            "name": "PowerShell Interactive Session",
            "cwd": "${workspaceRoot}"
        }'
}
$return -join ",`n"
%>
    ]
}