Skip to content

Commit 4f4841d

Browse files
tigCopilot
andcommitted
Restore .vscode and launchSettings debug profiles
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2fa7898 commit 4f4841d

5 files changed

Lines changed: 122 additions & 0 deletions

File tree

.vscode/extensions.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"recommendations": [
3+
"ms-dotnettools.csdevkit",
4+
"ms-dotnettools.csharp",
5+
"ms-vscode.powershell"
6+
]
7+
}

.vscode/launch.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
// Single debug profile that prompts for a sample command at launch.
3+
// Add new scenarios by appending an option to the "sampleCommand" input below.
4+
"version": "0.2.0",
5+
"inputs": [
6+
{
7+
"id": "sampleCommand",
8+
"type": "pickString",
9+
"description": "Sample command to run after importing the module",
10+
"default": "Get-Process | Out-ConsoleGridView -Debug",
11+
"options": [
12+
"Get-Process | Out-ConsoleGridView -Debug",
13+
"Get-Process | Select-Object ProcessName, Id, CPU | Out-ConsoleGridView -Debug -Filter com",
14+
"Get-Process | Out-ConsoleGridView -MinUi",
15+
"Get-Process | Select-Object ProcessName, Id, Handles, NPM, PM, WS, CPU | Out-ConsoleGridView",
16+
"Get-ChildItem | Out-ConsoleGridView -OutputMode Single",
17+
"Get-Process | Show-ObjectTree"
18+
]
19+
}
20+
],
21+
"configurations": [
22+
{
23+
"name": "ConsoleGuiTools",
24+
"type": "coreclr",
25+
"request": "launch",
26+
"preLaunchTask": "build",
27+
"program": "pwsh",
28+
"args": [
29+
"-NoProfile",
30+
"-NoLogo",
31+
"-NoExit",
32+
"-Command",
33+
"Import-Module ${workspaceFolder}/module/Microsoft.PowerShell.ConsoleGuiTools.psd1; ${input:sampleCommand}"
34+
],
35+
"cwd": "${workspaceFolder}",
36+
"console": "integratedTerminal",
37+
"stopAtEntry": false
38+
}
39+
]
40+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"git.ignoreLimitWarning": true
3+
}

.vscode/tasks.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"detail": "Build module via Invoke-Build (copies to ./module/)",
7+
"type": "process",
8+
"command": "pwsh",
9+
"args": [
10+
"-NoProfile",
11+
"-Command",
12+
"Invoke-Build Build"
13+
],
14+
"options": {
15+
"cwd": "${workspaceFolder}"
16+
},
17+
"group": {
18+
"kind": "build",
19+
"isDefault": true
20+
},
21+
"presentation": {
22+
"reveal": "silent",
23+
"panel": "shared",
24+
"clear": true
25+
},
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "test",
30+
"detail": "Run xunit tests via dotnet test (resolves GraphicalTools.slnx)",
31+
"type": "process",
32+
"command": "dotnet",
33+
"args": [
34+
"test"
35+
],
36+
"options": {
37+
"cwd": "${workspaceFolder}"
38+
},
39+
"group": {
40+
"kind": "test",
41+
"isDefault": true
42+
},
43+
"problemMatcher": "$msCompile"
44+
},
45+
{
46+
"label": "clean",
47+
"type": "process",
48+
"command": "pwsh",
49+
"args": [
50+
"-NoProfile",
51+
"-Command",
52+
"Invoke-Build Clean"
53+
],
54+
"options": {
55+
"cwd": "${workspaceFolder}"
56+
},
57+
"problemMatcher": []
58+
}
59+
]
60+
}

src/Microsoft.PowerShell.ConsoleGuiTools/Properties/launchSettings.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@
2929
"executablePath": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe",
3030
"commandLineArgs": "-NoProfile -NoLogo -NoExit -Command \"& { Import-Module '$(TargetPath)'; Get-Process | Show-ObjectTree -MinUI -filter con }\"",
3131
"workingDirectory": "$(TargetDir)"
32+
},
33+
"OCTV": {
34+
"commandName": "Executable",
35+
"executablePath": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe",
36+
"commandLineArgs": "-NoProfile -NoLogo -NoExit -Command \"& { Import-Module '$(TargetPath)'; Get-Process | Select-Object ProcessName, Id,\r\n @{Name='CPU(s)'; Expression={[math]::Round($_.CPU,2)}},\r\n @{Name='WorkingSet(MB)'; Expression={[math]::Round($_.WorkingSet64/1MB,2)}},\r\n @{Name='Private(MB)'; Expression={[math]::Round($_.PrivateMemorySize64/1MB,2)}}\r\n | Out-ConsoleTableView -Debug }\"",
37+
"workingDirectory": "$(TargetDir)"
38+
},
39+
"OCTV Slow": {
40+
"commandName": "Executable",
41+
"executablePath": "C:\\Program Files\\PowerShell\\7-preview\\pwsh.exe",
42+
"commandLineArgs": "-NoProfile -NoLogo -NoExit -Command \"& { Import-Module '$(TargetPath)'; 1..50 | ForEach-Object { Start-Sleep -Milliseconds 100; [PSCustomObject]@{ Index = $_; Time = (Get-Date -Format 'HH:mm:ss.fff'); Square = $_ * $_ } } | Out-ConsoleTableView -Debug }\"",
43+
"workingDirectory": "$(TargetDir)"
3244
}
3345
}
3446
}

0 commit comments

Comments
 (0)