SSPowerShellBoilerplate/vscode/launch.json

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
{
    "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"
%>
    ]
}