Skip to content

Commit a72bba5

Browse files
committed
Add debug settings for CLI and function apps
1 parent 153dfcc commit a72bba5

File tree

11 files changed

+734
-67
lines changed

11 files changed

+734
-67
lines changed

.editorconfig

Lines changed: 425 additions & 0 deletions
Large diffs are not rendered by default.

.vscode/extensions.json

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

.vscode/launch.json

Lines changed: 45 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,46 @@
11
{
2-
// Use IntelliSense to find out which attributes exist for C# debugging
3-
// Use hover for the description of the existing attributes
4-
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5-
"version": "0.2.0",
6-
"configurations": [
7-
{
8-
"name": ".NET Core Launch (console)",
9-
"type": "coreclr",
10-
"request": "launch",
11-
"preLaunchTask": "build",
12-
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests/bin/Debug/netcoreapp2.0/Aliencube.AzureFunctions.FunctionAppV2.Tests.dll",
14-
"args": [],
15-
"cwd": "${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests",
16-
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17-
"console": "internalConsole",
18-
"stopAtEntry": false
19-
},
20-
{
21-
"name": ".NET Core Attach",
22-
"type": "coreclr",
23-
"request": "attach",
24-
"processId": "${command:pickProcess}"
25-
}
26-
]
27-
}
2+
// Use IntelliSense to find out which attributes exist for C# debugging
3+
// Use hover for the description of the existing attributes
4+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": ".NET Core Console - Open API CLI",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build cli",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/src/Aliencube.AzureFunctions.Extensions.OpenApi.CLI/bin/Debug/netcoreapp3.1/azfuncopenapi.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}",
16+
"stopAtEntry": false,
17+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
18+
"console": "internalConsole"
19+
},
20+
{
21+
"name": ".NET Core Test - Sample Function App V2",
22+
"type": "coreclr",
23+
"request": "launch",
24+
"preLaunchTask": "build",
25+
// If you have changed target frameworks, make sure to update the program path.
26+
"program": "${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests/bin/Debug/netcoreapp2.0/Aliencube.AzureFunctions.FunctionAppV2.Tests.dll",
27+
"args": [],
28+
"cwd": "${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests",
29+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
30+
"console": "internalConsole",
31+
"stopAtEntry": false
32+
},
33+
{
34+
"name": ".NET Core Attach",
35+
"type": "coreclr",
36+
"request": "attach",
37+
"processId": "${command:pickProcess}"
38+
},
39+
{
40+
"name": "Attach to .NET Functions",
41+
"type": "coreclr",
42+
"request": "attach",
43+
"processId": "${command:azureFunctions.pickProcess}"
44+
}
45+
]
46+
}

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "samples/Aliencube.AzureFunctions.FunctionAppV3IoC/bin/Release/netcoreapp3.1/publish",
3+
"azureFunctions.projectLanguage": "C#",
4+
"azureFunctions.projectRuntime": "~3",
5+
"debug.internalConsoleOptions": "neverOpen",
6+
"azureFunctions.preDeployTask": "publish"
7+
}

.vscode/tasks.json

Lines changed: 89 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,90 @@
11
{
2-
"version": "2.0.0",
3-
"tasks": [
4-
{
5-
"label": "build",
6-
"command": "dotnet",
7-
"type": "process",
8-
"args": [
9-
"build",
10-
"${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests/Aliencube.AzureFunctions.FunctionAppV2.Tests.csproj",
11-
"/property:GenerateFullPaths=true",
12-
"/consoleloggerparameters:NoSummary"
13-
],
14-
"problemMatcher": "$msCompile"
15-
},
16-
{
17-
"label": "publish",
18-
"command": "dotnet",
19-
"type": "process",
20-
"args": [
21-
"publish",
22-
"${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests/Aliencube.AzureFunctions.FunctionAppV2.Tests.csproj",
23-
"/property:GenerateFullPaths=true",
24-
"/consoleloggerparameters:NoSummary"
25-
],
26-
"problemMatcher": "$msCompile"
27-
},
28-
{
29-
"label": "watch",
30-
"command": "dotnet",
31-
"type": "process",
32-
"args": [
33-
"watch",
34-
"run",
35-
"${workspaceFolder}/test/Aliencube.AzureFunctions.FunctionAppV2.Tests/Aliencube.AzureFunctions.FunctionAppV2.Tests.csproj",
36-
"/property:GenerateFullPaths=true",
37-
"/consoleloggerparameters:NoSummary"
38-
],
39-
"problemMatcher": "$msCompile"
40-
}
41-
]
42-
}
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"/property:GenerateFullPaths=true",
11+
"/consoleloggerparameters:NoSummary"
12+
],
13+
"problemMatcher": "$msCompile"
14+
},
15+
{
16+
"label": "build cli",
17+
"command": "dotnet",
18+
"type": "process",
19+
"args": [
20+
"build",
21+
"${workspaceFolder}/src/Aliencube.AzureFunctions.Extensions.OpenApi.CLI",
22+
"-f",
23+
"netcoreapp3.1",
24+
"/property:GenerateFullPaths=true",
25+
"/consoleloggerparameters:NoSummary"
26+
],
27+
"problemMatcher": "$msCompile"
28+
},
29+
{
30+
"label": "build - function app v3 ioc",
31+
"command": "dotnet",
32+
"type": "process",
33+
"args": [
34+
"build",
35+
"${workspaceFolder}/samples/Aliencube.AzureFunctions.FunctionAppV3IoC",
36+
"/property:GenerateFullPaths=true",
37+
"/consoleloggerparameters:NoSummary"
38+
],
39+
"problemMatcher": "$msCompile"
40+
},
41+
{
42+
"label": "build - function app v3 static",
43+
"command": "dotnet",
44+
"type": "process",
45+
"args": [
46+
"build",
47+
"${workspaceFolder}/samples/Aliencube.AzureFunctions.FunctionAppV3Static",
48+
"/property:GenerateFullPaths=true",
49+
"/consoleloggerparameters:NoSummary"
50+
],
51+
"problemMatcher": "$msCompile"
52+
},
53+
{
54+
"label": "publish",
55+
"command": "dotnet",
56+
"type": "process",
57+
"args": [
58+
"publish",
59+
"/property:GenerateFullPaths=true",
60+
"/consoleloggerparameters:NoSummary"
61+
],
62+
"problemMatcher": "$msCompile"
63+
},
64+
{
65+
"label": "watch",
66+
"command": "dotnet",
67+
"type": "process",
68+
"args": [
69+
"watch",
70+
"run",
71+
"/property:GenerateFullPaths=true",
72+
"/consoleloggerparameters:NoSummary"
73+
],
74+
"problemMatcher": "$msCompile"
75+
},
76+
{
77+
"type": "func",
78+
// Change this to what you want to test. eg) build - functiopn app v3 static
79+
"dependsOn": "build - function app v3 ioc",
80+
"options": {
81+
// Change the directory where you're going to test. eg) Aliencube.AzureFunctions.FunctionAppV3Static
82+
// Change the directory for target framework. eg) netcoreapp2.1
83+
"cwd": "${workspaceFolder}/samples/Aliencube.AzureFunctions.FunctionAppV3IoC/bin/Debug/netcoreapp3.1"
84+
},
85+
"command": "host start",
86+
"isBackground": true,
87+
"problemMatcher": "$func-watch"
88+
},
89+
]
90+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"recommendations": [
3+
"ms-azuretools.vscode-azurefunctions",
4+
"ms-dotnettools.csharp"
5+
]
6+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Attach to .NET Functions",
6+
"type": "coreclr",
7+
"request": "attach",
8+
"processId": "${command:azureFunctions.pickProcess}"
9+
}
10+
]
11+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"azureFunctions.deploySubpath": "bin/Release/netcoreapp3.1/publish",
3+
"azureFunctions.projectLanguage": "C#",
4+
"azureFunctions.projectRuntime": "~3",
5+
"debug.internalConsoleOptions": "neverOpen",
6+
"azureFunctions.preDeployTask": "publish"
7+
}
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "clean",
6+
"command": "dotnet",
7+
"args": [
8+
"clean",
9+
"/property:GenerateFullPaths=true",
10+
"/consoleloggerparameters:NoSummary"
11+
],
12+
"type": "process",
13+
"problemMatcher": "$msCompile"
14+
},
15+
{
16+
"label": "build",
17+
"command": "dotnet",
18+
"args": [
19+
"build",
20+
"/property:GenerateFullPaths=true",
21+
"/consoleloggerparameters:NoSummary"
22+
],
23+
"type": "process",
24+
"dependsOn": "clean",
25+
"group": {
26+
"kind": "build",
27+
"isDefault": true
28+
},
29+
"problemMatcher": "$msCompile"
30+
},
31+
{
32+
"label": "clean release",
33+
"command": "dotnet",
34+
"args": [
35+
"clean",
36+
"--configuration",
37+
"Release",
38+
"/property:GenerateFullPaths=true",
39+
"/consoleloggerparameters:NoSummary"
40+
],
41+
"type": "process",
42+
"problemMatcher": "$msCompile"
43+
},
44+
{
45+
"label": "publish",
46+
"command": "dotnet",
47+
"args": [
48+
"publish",
49+
"--configuration",
50+
"Release",
51+
"/property:GenerateFullPaths=true",
52+
"/consoleloggerparameters:NoSummary"
53+
],
54+
"type": "process",
55+
"dependsOn": "clean release",
56+
"problemMatcher": "$msCompile"
57+
},
58+
{
59+
"type": "func",
60+
"dependsOn": "build",
61+
"options": {
62+
"cwd": "${workspaceFolder}/bin/Debug/netcoreapp3.1"
63+
},
64+
"command": "host start",
65+
"isBackground": true,
66+
"problemMatcher": "$func-watch"
67+
}
68+
]
69+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// Use IntelliSense to find out which attributes exist for C# debugging
3+
// Use hover for the description of the existing attributes
4+
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": ".NET Core Launch (console)",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build",
12+
// If you have changed target frameworks, make sure to update the program path.
13+
"program": "${workspaceFolder}/bin/Debug/netcoreapp2.1/azfuncopenapi.dll",
14+
"args": [],
15+
"cwd": "${workspaceFolder}",
16+
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
17+
"console": "internalConsole",
18+
"stopAtEntry": false
19+
},
20+
{
21+
"name": ".NET Core Attach",
22+
"type": "coreclr",
23+
"request": "attach",
24+
"processId": "${command:pickProcess}"
25+
}
26+
]
27+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "build",
6+
"command": "dotnet",
7+
"type": "process",
8+
"args": [
9+
"build",
10+
"${workspaceFolder}/Aliencube.AzureFunctions.Extensions.OpenApi.CLI.csproj",
11+
"/property:GenerateFullPaths=true",
12+
"/consoleloggerparameters:NoSummary"
13+
],
14+
"problemMatcher": "$msCompile"
15+
},
16+
{
17+
"label": "publish",
18+
"command": "dotnet",
19+
"type": "process",
20+
"args": [
21+
"publish",
22+
"${workspaceFolder}/Aliencube.AzureFunctions.Extensions.OpenApi.CLI.csproj",
23+
"/property:GenerateFullPaths=true",
24+
"/consoleloggerparameters:NoSummary"
25+
],
26+
"problemMatcher": "$msCompile"
27+
},
28+
{
29+
"label": "watch",
30+
"command": "dotnet",
31+
"type": "process",
32+
"args": [
33+
"watch",
34+
"run",
35+
"${workspaceFolder}/Aliencube.AzureFunctions.Extensions.OpenApi.CLI.csproj",
36+
"/property:GenerateFullPaths=true",
37+
"/consoleloggerparameters:NoSummary"
38+
],
39+
"problemMatcher": "$msCompile"
40+
}
41+
]
42+
}

0 commit comments

Comments
 (0)