debugAdapter.ts ×16

Frontier kind: Joint frontier

unlabeled · c_fc4800985f3f

1 test · 14867 LOC · 72 files · introduces 1 test · 67 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
16 ranges67 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1981 ranges14867 lines · 72 files · Browse complete extent
All tests (intent)
1 testBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 67 introduced LOC across 16 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/debug/node/debugAdapter.ts 67 introduced LOC · 16 ranges

Open complete file

300
301 private static extract(platformContribution: IPlatformSpecificAdapterContribution, extensionFolderPath: string): IDebuggerContribution | undefined {
302 > if (!platformContribution) { debugAdapter.ts
303 return undefined;
304 }
306 > const result: IDebuggerContribution = Object.create(null);
307 > if (platformContribution.runtime) {
308 if (platformContribution.runtime.indexOf('./') === 0) { // TODO
309 result.runtime = path.join(extensionFolderPath, platformContribution.runtime);
312 }
313 }
314 > if (platformContribution.runtimeArgs) { debugAdapter.ts
315 result.runtimeArgs = platformContribution.runtimeArgs;
316 }
317 > if (platformContribution.program) { debugAdapter.ts
318 > if (!path.isAbsolute(platformContribution.program)) {
319 > result.program = path.join(extensionFolderPath, platformContribution.program);
320 > } else {
321 result.program = platformContribution.program;
322 }
323 > } debugAdapter.ts
324 > if (platformContribution.args) {
325 > result.args = platformContribution.args;
326 > }
327 >
328 > const contribution = platformContribution as IDebuggerContribution;
329 >
330 > if (contribution.win) {
331 result.win = ExecutableDebugAdapter.extract(contribution.win, extensionFolderPath);
332 }
333 > if (contribution.winx86) { debugAdapter.ts
334 result.winx86 = ExecutableDebugAdapter.extract(contribution.winx86, extensionFolderPath);
335 }
336 > if (contribution.windows) { debugAdapter.ts
337 result.windows = ExecutableDebugAdapter.extract(contribution.windows, extensionFolderPath);
338 }
339 > if (contribution.osx) { debugAdapter.ts
340 result.osx = ExecutableDebugAdapter.extract(contribution.osx, extensionFolderPath);
341 }
342 > if (contribution.linux) { debugAdapter.ts
343 result.linux = ExecutableDebugAdapter.extract(contribution.linux, extensionFolderPath);
344 }
345 > return result; debugAdapter.ts
346 > }
347
348 static platformAdapterExecutable(extensionDescriptions: IExtensionDescription[], debugType: string): IDebugAdapterExecutable | undefined {
349 > let result: IDebuggerContribution = Object.create(null); debugAdapter.ts
350 > debugType = debugType.toLowerCase();
351 >
352 > // merge all contributions into one
353 > for (const ed of extensionDescriptions) {
354 > if (ed.contributes) {
355 > const debuggers = <IDebuggerContribution[]>ed.contributes['debuggers'];
356 > if (debuggers && debuggers.length > 0) {
357 > debuggers.filter(dbg => typeof dbg.type === 'string' && strings.equalsIgnoreCase(dbg.type, debugType)).forEach(dbg => {
358 > // extract relevant attributes and make them absolute where needed
359 > const extractedDbg = ExecutableDebugAdapter.extract(dbg, ed.extensionLocation.fsPath);
360 >
361 > // merge
362 > result = objects.mixin(result, extractedDbg, ed.isBuiltin);
363 > });
364 > }
365 > }
366 > }
367 >
368 > // select the right platform
369 > let platformInfo: IPlatformSpecificAdapterContribution | undefined;
370 > if (platform.isWindows && !process.env.hasOwnProperty('PROCESSOR_ARCHITEW6432')) {
371 platformInfo = result.winx86 || result.win || result.windows;
372 > } else if (platform.isWindows) { debugAdapter.ts
373 platformInfo = result.win || result.windows;
374 > } else if (platform.isMacintosh) { debugAdapter.ts
375 platformInfo = result.osx;
376 > } else if (platform.isLinux) { debugAdapter.ts
377 > platformInfo = result.linux;
378 > }
379 > platformInfo = platformInfo || result;
380 >
381 > // these are the relevant attributes
382 > const program = platformInfo.program || result.program;
383 > const args = platformInfo.args || result.args;
384 > const runtime = platformInfo.runtime || result.runtime;
385 > const runtimeArgs = platformInfo.runtimeArgs || result.runtimeArgs;
386 >
387 > if (runtime) {
388 return {
389 type: 'executable',
391 args: (runtimeArgs || []).concat(typeof program === 'string' ? [program] : []).concat(args || [])
392 };
393 > } else if (program) { debugAdapter.ts
394 > return {
395 > type: 'executable',
396 > command: program,
397 > args: args || []
398 > };
399 > }
400
401 // nothing found
402 return undefined;
403 > } debugAdapter.ts
404 }