Skip to content

Commit ad22b2c

Browse files
committed
demo and launch
1 parent 154ac7c commit ad22b2c

4 files changed

Lines changed: 37 additions & 6 deletions

File tree

.vscode/launch.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,18 @@
2626
],
2727
"cwd": "${workspaceRoot}",
2828
"stopAtEntry": false
29-
}
29+
},
30+
{
31+
"name": "demo",
32+
"type": "coreclr",
33+
"request": "launch",
34+
"preLaunchTask": "buildDemo",
35+
"program": "${workspaceFolder}/Python.SystemDemo/bin/Debug/net7.0-windows/Python.SystemDemo.exe",
36+
"requireExactSource": false,
37+
"args": [],
38+
"cwd": "${workspaceFolder}",
39+
"stopAtEntry": false,
40+
"console": "internalConsole"
41+
},
3042
]
3143
}

.vscode/tasks.json

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@
1616
"reveal": "silent"
1717
},
1818
"problemMatcher": "$msCompile"
19-
}
19+
},
20+
{
21+
"label": "buildDemo",
22+
"command": "dotnet",
23+
"type": "shell",
24+
"args": [
25+
"build",
26+
"${workspaceFolder}/Python.SystemDemo/Python.SystemDemo.csproj",
27+
// Ask dotnet build to generate full paths for file names.
28+
"/property:GenerateFullPaths=true",
29+
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
30+
"/consoleloggerparameters:NoSummary",
31+
"-p:Configuration=Debug",
32+
],
33+
"group": "build",
34+
"presentation": {
35+
"reveal": "silent"
36+
},
37+
"problemMatcher": "$msCompile"
38+
},
2039
]
2140
}

Python.System.Demo.dib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ demo of Python.System
1515

1616
#!csharp
1717

18-
#r "nuget: Python.System, 1.0.6-debug4"
18+
#r "nuget: Python.System, *"
1919

2020
#!markdown
2121

Python.SystemDemo/SystemDemo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ public class Demo
66
{
77
public static void Main(string[] args)
88
{
9+
var eargs = Environment.GetCommandLineArgs();
10+
print(eargs);
11+
912
print("hello world");
1013
uint[] a = { 1, 2, 3, 4, 5, 6, 7 };
11-
print("hello world");
1214
print(a);
1315
print(a, sep: "\t");
1416

1517

16-
var eargs = Environment.GetCommandLineArgs();
1718

18-
print(eargs);
1919

2020
help();
2121

0 commit comments

Comments
 (0)