Skip to content

Commit e544340

Browse files
committed
Merge branch 'improve_ocgvbuild' into fix_121_filter_input
2 parents 50289b2 + c06641e commit e544340

File tree

4 files changed

+33
-63
lines changed

4 files changed

+33
-63
lines changed

.vscode/launch.json

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,20 @@
66
"configurations": [
77
{
88
"name": ".NET Core Launch (console)",
9+
"preLaunchTask": "build ConsoleGuiTools",
910
"type": "coreclr",
1011
"request": "launch",
11-
"preLaunchTask": "build",
12-
"program": "${workspaceFolder}/Cmdlet/bin/Debug/net6.0/win10-x64/OutGridViewCmdlet.dll",
13-
"args": [],
14-
"cwd": "${workspaceFolder}/Cmdlet",
15-
"console": "internalConsole",
16-
"stopAtEntry": false
17-
},
18-
{
19-
"name": ".NET Core Launch (application)",
20-
"type": "coreclr",
21-
"request": "launch",
22-
"preLaunchTask": "build",
23-
"program": "${workspaceFolder}/Application/bin/Debug/net6.0/win10-x64/OutGridViewApplication.dll",
24-
"args": [],
25-
"cwd": "${workspaceFolder}/Application",
26-
"console": "internalConsole",
27-
"stopAtEntry": false
12+
"program": "pwsh",
13+
"args": [
14+
"-NoExit",
15+
"-NoProfile",
16+
"-Command",
17+
"Import-Module ${workspaceFolder}/module/Microsoft.PowerShell.ConsoleGuiTools"
18+
],
19+
"cwd": "${workspaceFolder}",
20+
"console": "integratedTerminal",
21+
"stopAtEntry": false,
22+
"justMyCode": false
2823
},
2924
{
3025
"name": ".NET Core Attach",

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"files.associations": {
3-
"**/.vsts-ci/**/*.yml":"azure-pipelines"
3+
"**/.vsts-ci/**/*.yml":"azure-pipelines",
44
}
55
}

.vscode/tasks.json

Lines changed: 14 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
{
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
24
"version": "2.0.0",
35
"tasks": [
46
{
5-
"label": "build",
6-
"osx": {
7-
"command": "/usr/local/bin/pwsh"
8-
},
9-
"windows": {
10-
"command": "pwsh.exe"
11-
},
12-
"linux": {
13-
"command": "/usr/local/bin/pwsh"
14-
},
15-
"type": "process",
7+
"label": "build ConsoleGuiTools",
8+
"command": "Invoke-Build",
9+
"type": "shell",
1610
"args": [
17-
"-c",
18-
"Invoke-Build",
19-
// Build both modules
20-
//"Build -ModuleName Microsoft.PowerShell.GraphicalTools, Microsoft.PowerShell.ConsoleGuiTools",
21-
// Build only Out-GridView
22-
//"Build -ModuleName Microsoft.PowerShell.GraphicalTools",
23-
// Build only Out-ConsoleGridView
24-
"Build -ModuleName Microsoft.PowerShell.ConsoleGuiTools",
11+
"Build",
12+
"-Module",
13+
"Microsoft.PowerShell.ConsoleGuiTools"
2514
],
26-
"problemMatcher": "$msCompile",
27-
"group": {
28-
"kind": "build",
29-
"isDefault": true
30-
}
15+
"group": "build",
16+
"presentation": {
17+
"reveal": "silent"
18+
},
19+
"problemMatcher": "$msCompile"
3120
}
3221
]
3322
}

README.md

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ to view and filter objects graphically.
2525

2626
## Development
2727

28-
### 1. Install PowerShell 7.1+
28+
### 1. Install PowerShell 7.2+
2929

30-
Install PowerShell 7.1+ with [these instructions](https://github.com/PowerShell/PowerShell#get-powershell).
30+
Install PowerShell 7.2+ with [these instructions](https://github.com/PowerShell/PowerShell#get-powershell).
3131

3232
### 2. Clone the GitHub repository
3333

@@ -72,29 +72,15 @@ PS ./GraphicalTools> code .
7272

7373
Build by hitting `Ctrl-Shift-B` in VS Code.
7474

75-
To debug:
75+
Set a breakpoint and hit `F5` to start the debugger.
7676

77-
In a PowerShell session in the `./GraphicalTools` directory, run `pwsh` (thus
78-
nesting PowerShell).
79-
80-
Then do the folowing:
77+
Click on the VS Code "TERMINAL" tab and type your command that starts `Out-ConsoleGridView`, e.g.
8178

8279
```powershell
83-
Import-Module ./module/Microsoft.PowerShell.ConsoleGuiTools
84-
$pid
80+
ls | ocgv
8581
```
8682

87-
This will import the latest built DLL and output the process ID you'll need
88-
for debugging. Copy this ID to the clipboard.
89-
90-
In VScode, set your breakpoints, etc. Then hit `F5`. In the VScode search
91-
box, paste the value printed by `$pid`. You'll see something like `pwsh.exe
92-
18328`. Click that and the debug session will start.
93-
94-
In the PowerShell session run your commands; breakpoints will be hit, etc.
95-
96-
When done, run `exit` to exit the nested PowerShell and run `pwsh` again.
97-
This unloads the DLL. Repeat.
83+
Your breakpoint should be hit.
9884

9985
## Contributions Welcome
10086

0 commit comments

Comments
 (0)