Skip to content

Commit 425dd6b

Browse files
Add support for new Linux distros in the debugger (#1000)
This adds support for Ubuntu 16.10, Fedora 24 and openSUSE 42.1. To do this we are moving the debugger packages to .NET Core 1.1.
1 parent cca5ca3 commit 425dd6b

File tree

3 files changed

+177
-27
lines changed

3 files changed

+177
-27
lines changed

package.json

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "csharp",
33
"publisher": "ms-vscode",
4-
"version": "1.6.0-beta2",
4+
"version": "1.6.0-beta3",
55
"description": "C# for Visual Studio Code (powered by OmniSharp).",
66
"displayName": "C#",
77
"author": "Microsoft Corporation",
@@ -136,17 +136,17 @@
136136
},
137137
{
138138
"description": ".NET Core Debugger (Windows / x64)",
139-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-win7-x64.zip",
140-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-win7-x64.zip",
139+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-win7-x64.zip",
140+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-win7-x64.zip",
141141
"installPath": ".debugger",
142142
"runtimeIds": [
143143
"win7-x64"
144144
]
145145
},
146146
{
147147
"description": ".NET Core Debugger (macOS / x64)",
148-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-osx.10.11-x64.zip",
149-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-osx.10.11-x64.zip",
148+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-osx.10.11-x64.zip",
149+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-osx.10.11-x64.zip",
150150
"installPath": ".debugger",
151151
"runtimeIds": [
152152
"osx.10.11-x64"
@@ -158,8 +158,8 @@
158158
},
159159
{
160160
"description": ".NET Core Debugger (CentOS / x64)",
161-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-centos.7-x64.zip",
162-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-centos.7-x64.zip",
161+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-centos.7-x64.zip",
162+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-centos.7-x64.zip",
163163
"installPath": ".debugger",
164164
"runtimeIds": [
165165
"centos.7-x64"
@@ -171,8 +171,8 @@
171171
},
172172
{
173173
"description": ".NET Core Debugger (Debian / x64)",
174-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-debian.8-x64.zip",
175-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-debian.8-x64.zip",
174+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-debian.8-x64.zip",
175+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-debian.8-x64.zip",
176176
"installPath": ".debugger",
177177
"runtimeIds": [
178178
"debian.8-x64"
@@ -183,9 +183,9 @@
183183
]
184184
},
185185
{
186-
"description": ".NET Core Debugger (Fedora / x64)",
187-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-fedora.23-x64.zip",
188-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-fedora.23-x64.zip",
186+
"description": ".NET Core Debugger (Fedora 23 / x64)",
187+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-fedora.23-x64.zip",
188+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-fedora.23-x64.zip",
189189
"installPath": ".debugger",
190190
"runtimeIds": [
191191
"fedora.23-x64"
@@ -196,9 +196,22 @@
196196
]
197197
},
198198
{
199-
"description": ".NET Core Debugger (OpenSUSE / x64)",
200-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-opensuse.13.2-x64.zip",
201-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-opensuse.13.2-x64.zip",
199+
"description": ".NET Core Debugger (Fedora 24 / x64)",
200+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-fedora.24-x64.zip",
201+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-fedora.24-x64.zip",
202+
"installPath": ".debugger",
203+
"runtimeIds": [
204+
"fedora.24-x64"
205+
],
206+
"binaries": [
207+
"./OpenDebugAD7",
208+
"./clrdbg"
209+
]
210+
},
211+
{
212+
"description": ".NET Core Debugger (OpenSUSE 13 / x64)",
213+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-opensuse.13.2-x64.zip",
214+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-opensuse.13.2-x64.zip",
202215
"installPath": ".debugger",
203216
"runtimeIds": [
204217
"opensuse.13.2-x64"
@@ -208,10 +221,23 @@
208221
"./clrdbg"
209222
]
210223
},
224+
{
225+
"description": ".NET Core Debugger (OpenSUSE 42 / x64)",
226+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-opensuse.42.1-x64.zip",
227+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-opensuse.42.1-x64.zip",
228+
"installPath": ".debugger",
229+
"runtimeIds": [
230+
"opensuse.42.1-x64"
231+
],
232+
"binaries": [
233+
"./OpenDebugAD7",
234+
"./clrdbg"
235+
]
236+
},
211237
{
212238
"description": ".NET Core Debugger (RHEL / x64)",
213-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-rhel.7.2-x64.zip",
214-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-rhel.7.2-x64.zip",
239+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-rhel.7.2-x64.zip",
240+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-rhel.7.2-x64.zip",
215241
"installPath": ".debugger",
216242
"runtimeIds": [
217243
"rhel.7-x64"
@@ -222,9 +248,9 @@
222248
]
223249
},
224250
{
225-
"description": ".NET Core Debugger (Ubuntu 14 / x64)",
226-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-ubuntu.14.04-x64.zip",
227-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-ubuntu.14.04-x64.zip",
251+
"description": ".NET Core Debugger (Ubuntu 14.04 / x64)",
252+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.14.04-x64.zip",
253+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.14.04-x64.zip",
228254
"installPath": ".debugger",
229255
"runtimeIds": [
230256
"ubuntu.14.04-x64"
@@ -235,9 +261,9 @@
235261
]
236262
},
237263
{
238-
"description": ".NET Core Debugger (Ubuntu 16 / x64)",
239-
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-5-0/coreclr-debug-ubuntu.16.04-x64.zip",
240-
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-5-0/coreclr-debug-ubuntu.16.04-x64.zip",
264+
"description": ".NET Core Debugger (Ubuntu 16.04 / x64)",
265+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.16.04-x64.zip",
266+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.16.04-x64.zip",
241267
"installPath": ".debugger",
242268
"runtimeIds": [
243269
"ubuntu.16.04-x64"
@@ -246,6 +272,19 @@
246272
"./OpenDebugAD7",
247273
"./clrdbg"
248274
]
275+
},
276+
{
277+
"description": ".NET Core Debugger (Ubuntu 16.10 / x64)",
278+
"url": "https://vsdebugger.azureedge.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.16.10-x64.zip",
279+
"fallbackUrl": "https://vsdebugger.blob.core.windows.net/coreclr-debug-1-6-0/coreclr-debug-ubuntu.16.10-x64.zip",
280+
"installPath": ".debugger",
281+
"runtimeIds": [
282+
"ubuntu.16.10-x64"
283+
],
284+
"binaries": [
285+
"./OpenDebugAD7",
286+
"./clrdbg"
287+
]
249288
}
250289
],
251290
"engines": {

src/platform.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,20 +269,26 @@ export class PlatformInformation {
269269
const centos_7 = 'centos.7-x64';
270270
const debian_8 = 'debian.8-x64';
271271
const fedora_23 = 'fedora.23-x64';
272+
const fedora_24 = 'fedora.24-x64';
272273
const opensuse_13_2 = 'opensuse.13.2-x64';
274+
const opensuse_42_1 = 'opensuse.42.1-x64';
273275
const rhel_7 = 'rhel.7-x64';
274276
const ubuntu_14_04 = 'ubuntu.14.04-x64';
275277
const ubuntu_16_04 = 'ubuntu.16.04-x64';
278+
const ubuntu_16_10 = 'ubuntu.16.10-x64';
276279

277280
switch (distributionName) {
278281
case 'ubuntu':
279-
if (distributionVersion.startsWith("14")) {
282+
if (distributionVersion === "14.04") {
280283
// This also works for Linux Mint
281284
return ubuntu_14_04;
282285
}
283-
else if (distributionVersion.startsWith("16")) {
286+
else if (distributionVersion === "16.04") {
284287
return ubuntu_16_04;
285288
}
289+
else if (distributionVersion === "16.10") {
290+
return ubuntu_16_10;
291+
}
286292

287293
break;
288294
case 'elementary':
@@ -309,9 +315,21 @@ export class PlatformInformation {
309315
// Oracle Linux is binary compatible with CentOS
310316
return centos_7;
311317
case 'fedora':
312-
return fedora_23;
318+
if (distributionVersion === "23") {
319+
return fedora_23;
320+
} else if (distributionVersion === "24") {
321+
return fedora_24;
322+
}
323+
break;
324+
313325
case 'opensuse':
314-
return opensuse_13_2;
326+
if (distributionVersion.startsWith("13.")) {
327+
return opensuse_13_2;
328+
} else if (distributionVersion.startsWith("42.")) {
329+
return opensuse_42_1;
330+
}
331+
break;
332+
315333
case 'rhel':
316334
return rhel_7;
317335
case 'debian':

test/platform.tests.ts

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,18 @@ suite("Platform", () => {
7373
platformInfo.runtimeId.should.equal('ubuntu.14.04-x64');
7474
})
7575

76+
test("Compute correct RID for Ubuntu 16.04", () => {
77+
const platformInfo = new PlatformInformation('linux', 'x86_64', distro_ubuntu_16_04());
78+
79+
platformInfo.runtimeId.should.equal('ubuntu.16.04-x64');
80+
})
81+
82+
test("Compute correct RID for Ubuntu 16.10", () => {
83+
const platformInfo = new PlatformInformation('linux', 'x86_64', distro_ubuntu_16_10());
84+
85+
platformInfo.runtimeId.should.equal('ubuntu.16.10-x64');
86+
})
87+
7688
test("Compute correct RID for Fedora 23", () => {
7789
const platformInfo = new PlatformInformation('linux', 'x86_64', distro_fedora_23());
7890

@@ -97,6 +109,18 @@ suite("Platform", () => {
97109
platformInfo.runtimeId.should.equal('ubuntu.16.04-x64');
98110
})
99111

112+
test("Compute correct RID for openSUSE 13", () => {
113+
const platformInfo = new PlatformInformation('linux', 'x86_64', distro_openSUSE_13_2());
114+
115+
platformInfo.runtimeId.should.equal('opensuse.13.2-x64');
116+
})
117+
118+
test("Compute correct RID for openSUSE 42", () => {
119+
const platformInfo = new PlatformInformation('linux', 'x86_64', distro_openSUSE_42_1());
120+
121+
platformInfo.runtimeId.should.equal('opensuse.42.1-x64');
122+
})
123+
100124
test("Compute no RID for CentOS 7 with 32-bit architecture", () => {
101125
const platformInfo = new PlatformInformation('linux', 'x86', distro_centos_7());
102126

@@ -126,6 +150,43 @@ BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"`;
126150
return LinuxDistribution.FromReleaseInfo(input, '\n');
127151
}
128152

153+
function distro_ubuntu_16_04(): LinuxDistribution {
154+
// Copied from /etc/os-release on Ubuntu 16.04 server
155+
const input = `
156+
NAME="Ubuntu"
157+
VERSION="16.04.1 LTS (Xenial Xerus)"
158+
ID=ubuntu
159+
ID_LIKE=debian
160+
PRETTY_NAME="Ubuntu 16.04.1 LTS"
161+
VERSION_ID="16.04"
162+
HOME_URL="http://www.ubuntu.com/"
163+
SUPPORT_URL="http://help.ubuntu.com/"
164+
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
165+
VERSION_CODENAME=xenial
166+
UBUNTU_CODENAME=xenial`;
167+
168+
return LinuxDistribution.FromReleaseInfo(input, '\n');
169+
}
170+
171+
function distro_ubuntu_16_10(): LinuxDistribution {
172+
// Copied from /etc/os-release on Ubuntu 16.10 server
173+
const input = `
174+
NAME="Ubuntu"
175+
VERSION="16.10 (Yakkety Yak)"
176+
ID=ubuntu
177+
ID_LIKE=debian
178+
PRETTY_NAME="Ubuntu 16.10"
179+
VERSION_ID="16.10"
180+
HOME_URL="http://www.ubuntu.com/"
181+
SUPPORT_URL="http://help.ubuntu.com/"
182+
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
183+
PRIVACY_POLICY_URL="http://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
184+
VERSION_CODENAME=yakkety
185+
UBUNTU_CODENAME=yakkety`;
186+
187+
return LinuxDistribution.FromReleaseInfo(input, '\n');
188+
}
189+
129190
function distro_fedora_23(): LinuxDistribution {
130191
// Copied from /etc/os-release on Fedora 23
131192
const input = `
@@ -204,6 +265,38 @@ UBUNTU_CODENAME=xenial`;
204265
return LinuxDistribution.FromReleaseInfo(input, '\n');
205266
}
206267

268+
function distro_openSUSE_13_2(): LinuxDistribution {
269+
const input = `
270+
NAME=openSUSE
271+
VERSION="13.2 (Harlequin)"
272+
VERSION_ID="13.2"
273+
PRETTY_NAME="openSUSE 13.2 (Harlequin) (x86_64)"
274+
ID=opensuse
275+
ANSI_COLOR="0;32"
276+
CPE_NAME="cpe:/o:opensuse:opensuse:13.2"
277+
BUG_REPORT_URL="https://bugs.opensuse.org"
278+
HOME_URL="https://opensuse.org/"
279+
ID_LIKE="suse"`;
280+
281+
return LinuxDistribution.FromReleaseInfo(input, '\n');
282+
}
283+
284+
function distro_openSUSE_42_1(): LinuxDistribution {
285+
const input = `
286+
NAME="openSUSE Leap"
287+
VERSION="42.1"
288+
VERSION_ID="42.1"
289+
PRETTY_NAME="openSUSE Leap 42.1 (x86_64)"
290+
ID=opensuse
291+
ANSI_COLOR="0;32"
292+
CPE_NAME="cpe:/o:opensuse:opensuse:42.1"
293+
BUG_REPORT_URL="https://bugs.opensuse.org"
294+
HOME_URL="https://opensuse.org/"
295+
ID_LIKE="suse"`;
296+
297+
return LinuxDistribution.FromReleaseInfo(input, '\n');
298+
}
299+
207300
function distro_unknown_no_id_like(): LinuxDistribution {
208301
const input = `
209302
PRETTY_NAME="Make believe 1.0"

0 commit comments

Comments
 (0)