Skip to content

Commit 9a2ff73

Browse files
committed
Explicitly throw if runtimeId is missing
1 parent b8d485e commit 9a2ff73

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/coreclr-debug/util.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,15 @@ export function getTargetArchitecture(platformInfo: PlatformInformation, launchJ
127127
}
128128

129129
// Otherwise, look at the runtime ID.
130-
if (dotnetInfo.RuntimeId?.includes('arm64'))
130+
if (!dotnetInfo.RuntimeId) {
131+
throw new Error(`Unable to determine RuntimeId. Please set 'targetArchitecture' in your launch.json configuration.`)
132+
}
133+
134+
if (dotnetInfo.RuntimeId.includes('arm64'))
131135
{
132136
return 'arm64';
133137
}
134-
else if (dotnetInfo.RuntimeId?.includes('x64'))
138+
else if (dotnetInfo.RuntimeId.includes('x64'))
135139
{
136140
return 'x86_64';
137141
}

0 commit comments

Comments
 (0)