src/vs/workbench/contrib/debug/browser/debugAdapterManager.ts/AdapterManager/registerListeners
class AdapterManager:	private registerListeners(): void {
		debuggersExtPoint.setHandler((extensions, delta) => {
			delta.added.forEach(added => {
				added.value.forEach(rawAdapter => {
					if (!rawAdapter.type || (typeof rawAdapter.type !== 'string')) {
						added.collector.error(nls.localize('debugNoType', "Debugger 'type' can not be omitted and must be of type 'string'."));
					}

					if (rawAdapter.type !== '*') {
						const existing = this.getDebugger(rawAdapter.type);
						if (existing) {
							existing.merge(rawAdapter, added.description);
						} else {
							this.debuggers.push(this.instantiationService.createInstance(Debugger, this, rawAdapter, added.description));
						}
					}
				});
			});

			// take care of all wildcard contributions
			extensions.forEach(extension => {
				extension.value.forEach(rawAdapter => {
					if (rawAdapter.type === '*') {
						this.debuggers.forEach(dbg => dbg.merge(rawAdapter, extension.description));
					}
				});
			});

			delta.removed.forEach(removed => {
				const removedTypes = removed.value.map(rawAdapter => rawAdapter.type);
				this.debuggers = this.debuggers.filter(d => removedTypes.indexOf(d.type) === -1);
			});

			// update the schema to include all attributes, snippets and types from extensions.
			const items = (<IJSONSchema>launchSchema.properties!['configurations'].items);
			const taskSchema = TaskDefinitionRegistry.getJsonSchema();
			const definitions: IJSONSchemaMap = {
				'common': {
					properties: {
						'name': {
							type: 'string',
							description: nls.localize('debugName', "Name of configuration; appears in the launch configuration dropdown menu."),
							default: 'Launch'
						},
						'debugServer': {
							type: 'number',
							description: nls.localize('debugServer', "For debug extension development only: if a port is specified VS Code tries to connect to a debug adapter running in server mode"),
							default: 4711
						},
						'preLaunchTask': {
							anyOf: [taskSchema, {
								type: ['string']
							}],
							default: '',
							defaultSnippets: [{ body: { task: '', type: '' } }],
							description: nls.localize('debugPrelaunchTask', "Task to run before debug session starts.")
						},
						'postDebugTask': {
							anyOf: [taskSchema, {
								type: ['string'],
							}],
							default: '',
							defaultSnippets: [{ body: { task: '', type: '' } }],
							description: nls.localize('debugPostDebugTask', "Task to run after debug session ends.")
						},
						'presentation': presentationSchema,
						'internalConsoleOptions': INTERNAL_CONSOLE_OPTIONS_SCHEMA,
					}
				}
			};
			launchSchema.definitions = definitions;
			items.oneOf = [];
			items.defaultSnippets = [];
			this.debuggers.forEach(adapter => {
				const schemaAttributes = adapter.getSchemaAttributes(definitions);
				if (schemaAttributes && items.oneOf) {
					items.oneOf.push(...schemaAttributes);
				}
				const configurationSnippets = adapter.configurationSnippets;
				if (configurationSnippets && items.defaultSnippets) {
					items.defaultSnippets.push(...configurationSnippets);
				}
			});
			jsonRegistry.registerSchema(launchSchemaId, launchSchema);

			this._onDidDebuggersExtPointRead.fire();
		});

		breakpointsExtPoint.setHandler((extensions, delta) => {
			delta.removed.forEach(removed => {
				removed.value.forEach(breakpoints => this.breakpointModeIdsSet.delete(breakpoints.language));
			});
			delta.added.forEach(added => {
				added.value.forEach(breakpoints => this.breakpointModeIdsSet.add(breakpoints.language));
			});
		});
	}