Skip to content

Commit 2504748

Browse files
committed
VSCode: add configuration for DWARF and PDBs
Add a secondary debug configuration for generating PDBs when building a debug build. Additionally, improve the configuration to ensure that the debug information is preserved when building in the debug mode configuration. Reindent the file to use the same indentation as the rest of the project.
1 parent d58aaac commit 2504748

File tree

1 file changed

+125
-100
lines changed

1 file changed

+125
-100
lines changed

.vscode/tasks.json

Lines changed: 125 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,136 @@
11
// See https://go.microsoft.com/fwlink/?LinkId=733558
22
// for the documentation about the tasks.json format
33
{
4-
"version": "2.0.0",
5-
"problemMatcher": {
6-
"owner": "swift",
7-
"fileLocation": "autoDetect",
8-
"pattern": {
9-
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
10-
"file": 1,
11-
"line": 2,
12-
"column": 3,
13-
"severity": 4,
14-
"message": 5
4+
"version": "2.0.0",
5+
"problemMatcher": {
6+
"owner": "swift",
7+
"fileLocation": "autoDetect",
8+
"pattern": {
9+
"regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$",
10+
"file": 1,
11+
"line": 2,
12+
"column": 3,
13+
"severity": 4,
14+
"message": 5
15+
}
16+
},
17+
"tasks": [
18+
{
19+
"label": "Build (Debug DWARF)",
20+
"type": "shell",
21+
"command": "swift",
22+
"args": [
23+
"build",
24+
"-c", "debug",
25+
"-Xlinker", "-debug:dwarf",
26+
],
27+
"group": {
28+
"kind": "build",
29+
"isDefault": true
30+
},
31+
"windows": {
32+
"options": {
33+
"shell": {
34+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
35+
"args": [
36+
"/d",
37+
"/c",
38+
]
39+
}
1540
}
41+
}
1642
},
17-
"tasks": [
18-
{
19-
"label": "Build (Debug)",
20-
"type": "shell",
21-
"command": "swift",
43+
{
44+
"label": "Build (Debug PDB)",
45+
"type": "shell",
46+
"command": "swift",
47+
"args": [
48+
"build",
49+
"-c", "debug",
50+
"-Xswiftc", "-g",
51+
"-Xswiftc", "-debug-info-format=codeview",
52+
"-Xlinker", "-debug",
53+
],
54+
"group": "build",
55+
"windows": {
56+
"options": {
57+
"shell": {
58+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
2259
"args": [
23-
"build",
24-
"-c", "debug",
25-
],
26-
"group": {
27-
"kind": "build",
28-
"isDefault": true
29-
},
30-
"windows": {
31-
"options": {
32-
"shell": {
33-
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
34-
"args": [
35-
"/d",
36-
"/c",
37-
]
38-
}
39-
}
40-
}
41-
},
42-
{
43-
"label": "Build (Release)",
44-
"type": "shell",
45-
"command": "swift",
60+
"/d",
61+
"/c",
62+
]
63+
}
64+
}
65+
}
66+
},
67+
{
68+
"label": "Build (Release)",
69+
"type": "shell",
70+
"command": "swift",
71+
"args": [
72+
"build",
73+
"-c", "release",
74+
],
75+
"group": "build",
76+
"windows": {
77+
"options": {
78+
"shell": {
79+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
4680
"args": [
47-
"build",
48-
"-c", "release",
49-
],
50-
"group": "build",
51-
"windows": {
52-
"options": {
53-
"shell": {
54-
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
55-
"args": [
56-
"/d",
57-
"/c",
58-
]
59-
}
60-
}
61-
}
62-
},
63-
{
64-
"label": "Test (Debug)",
65-
"type": "shell",
66-
"command": "swift",
81+
"/d",
82+
"/c",
83+
]
84+
}
85+
}
86+
}
87+
},
88+
{
89+
"label": "Test (Debug)",
90+
"type": "shell",
91+
"command": "swift",
92+
"args": [
93+
"test",
94+
"-c", "debug",
95+
"-Xswiftc", "-DENABLE_TESTING",
96+
],
97+
"group": {
98+
"kind": "test",
99+
"isDefault": true
100+
},
101+
"windows": {
102+
"options": {
103+
"shell": {
104+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
67105
"args": [
68-
"test",
69-
"-c", "debug",
70-
"-Xswiftc", "-DENABLE_TESTING",
71-
],
72-
"group": {
73-
"kind": "test",
74-
"isDefault": true
75-
},
76-
"windows": {
77-
"options": {
78-
"shell": {
79-
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
80-
"args": [
81-
"/d",
82-
"/c",
83-
]
84-
}
85-
}
86-
},
87-
},
88-
{
89-
"label": "Test (Release)",
90-
"command": "swift",
91-
"type": "shell",
106+
"/d",
107+
"/c",
108+
]
109+
}
110+
}
111+
},
112+
},
113+
{
114+
"label": "Test (Release)",
115+
"command": "swift",
116+
"type": "shell",
117+
"args": [
118+
"test",
119+
"-c", "release",
120+
"-Xswiftc", "-DENABLE_TESTING",
121+
],
122+
"group": "test",
123+
"windows": {
124+
"options": {
125+
"shell": {
126+
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
92127
"args": [
93-
"test",
94-
"-c", "release",
95-
"-Xswiftc", "-DENABLE_TESTING",
96-
],
97-
"group": "test",
98-
"windows": {
99-
"options": {
100-
"shell": {
101-
"executable": "C:\\WINDOWS\\System32\\cmd.exe",
102-
"args": [
103-
"/d",
104-
"/c",
105-
]
106-
}
107-
}
108-
}
128+
"/d",
129+
"/c",
130+
]
131+
}
109132
}
110-
]
133+
}
134+
}
135+
]
111136
}

0 commit comments

Comments
 (0)