debugger.ts ×5

Frontier kind: Joint frontier

unlabeled · c_b5f7844b6cfa

1 test · 14759 LOC · 72 files · introduces 1 test · 89 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges89 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
1928 ranges14759 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.

3 files ranked by introduced lines: 89 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

src/vs/workbench/contrib/debug/common/debugger.ts 77 introduced LOC · 5 ranges

Open complete file

159
160 get enabled() {
161 > return !this.debuggerWhen || this.contextKeyService.contextMatchesRules(this.debuggerWhen); debugger.ts
162 > }
163
164 get isHiddenFromDropdown() {
240
241 getSchemaAttributes(definitions: IJSONSchemaMap): IJSONSchema[] | null {
242 > debugger.ts
243 > if (!this.debuggerContribution.configurationAttributes) {
244 return null;
245 }
246 > debugger.ts
247 > // fill in the default configuration attributes shared by all adapters.
248 > return Object.entries(this.debuggerContribution.configurationAttributes).map(([request, attributes]) => {
249 > const definitionId = `${this.type}:${request}`;
250 > const platformSpecificDefinitionId = `${this.type}:${request}:platform`;
251 > const defaultRequired = ['name', 'type', 'request'];
252 > attributes.required = attributes.required && attributes.required.length ? defaultRequired.concat(attributes.required) : defaultRequired;
253 > attributes.additionalProperties = false;
254 > attributes.type = 'object';
255 > if (!attributes.properties) {
256 attributes.properties = {};
257 }
258 > const properties = attributes.properties; debugger.ts
259 > properties['type'] = {
260 > enum: [this.type],
261 > enumDescriptions: [this.label],
262 > description: nls.localize('debugType', "Type of configuration."),
263 > pattern: '^(?!node2)',
264 > deprecationMessage: this.debuggerContribution.deprecated || (this.enabled ? undefined : debuggerDisabledMessage(this.type)),
265 > doNotSuggest: !!this.debuggerContribution.deprecated,
266 > errorMessage: nls.localize('debugTypeNotRecognised', "The debug type is not recognized. Make sure that you have a corresponding debug extension installed and that it is enabled."),
267 > patternErrorMessage: nls.localize('node2NotSupported', "\"node2\" is no longer supported, use \"node\" instead and set the \"protocol\" attribute to \"inspector\".")
268 > };
269 > properties['request'] = {
270 > enum: [request],
271 > description: nls.localize('debugRequest', "Request type of configuration. Can be \"launch\" or \"attach\"."),
272 > };
273 > for (const prop in definitions['common'].properties) {
274 properties[prop] = {
275 $ref: `#/definitions/common/properties/${prop}`
276 };
277 }
278 > const malformedPropertyNames: string[] = []; debugger.ts
279 > Object.keys(properties).forEach(name => {
280 > const property = properties[name];
281 > // A debugger extension may contribute a malformed property whose value is not a schema
282 > // object (e.g. the bare string 'integer' instead of `{ "type": "integer" }`). Skip those so
283 > // one bad contribution does not throw and abort schema generation for every debugger.
284 > if (isObject(property)) {
285 > // Use schema allOf property to get independent error reporting #21113
286 > ConfigurationResolverUtils.applyDeprecatedVariableMessage(property);
287 > } else {
288 > malformedPropertyNames.push(name);
289 > }
290 > });
291 > if (malformedPropertyNames.length) {
292 > this.logService.warn(`Ignoring malformed debug configuration schema properties for type '${this.type}': ${malformedPropertyNames.join(', ')}`);
293 > }
294 >
295 > definitions[definitionId] = { ...attributes };
296 > definitions[platformSpecificDefinitionId] = {
297 > type: 'object',
298 > additionalProperties: false,
299 > properties: filter(properties, key => key !== 'type' && key !== 'request' && key !== 'name')
300 > };
301 >
302 > // Don't add the OS props to the real attributes object so they don't show up in 'definitions'
303 > const attributesCopy = { ...attributes };
304 > attributesCopy.properties = {
305 > ...properties,
306 > ...{
307 > windows: {
308 > $ref: `#/definitions/${platformSpecificDefinitionId}`,
309 > description: nls.localize('debugWindowsConfiguration', "Windows specific launch configuration attributes."),
310 > },
311 > osx: {
312 > $ref: `#/definitions/${platformSpecificDefinitionId}`,
313 > description: nls.localize('debugOSXConfiguration', "OS X specific launch configuration attributes."),
314 > },
315 > linux: {
316 > $ref: `#/definitions/${platformSpecificDefinitionId}`,
317 > description: nls.localize('debugLinuxConfiguration', "Linux specific launch configuration attributes."),
318 > }
319 > }
320 > };
321 >
322 > return attributesCopy;
323 > });
324 > }
325 }
src/vs/base/common/objects.ts 8 introduced LOC · 1 range

Open complete file

269
270 export function filter(obj: obj, predicate: (key: string, value: any) => boolean): obj {
271 > const result = Object.create(null); objects.ts
272 > for (const [key, value] of Object.entries(obj)) {
273 > if (predicate(key, value)) {
274 > result[key] = value;
275 > }
276 > }
277 > return result;
278 > }
279
280 export function mapValues<T extends {}, R>(obj: T, fn: (value: T[keyof T], key: string) => R): { [K in keyof T]: R } {
src/vs/workbench/services/configurationResolver/common/configurationResolverUtils.ts 4 introduced LOC · 1 range

Open complete file

7
8 export function applyDeprecatedVariableMessage(schema: IJSONSchema) {
9 > schema.pattern = schema.pattern || '^(?!.*\\$\\{(env|config|command)\\.)'; configurationResolverUtils.ts
10 > schema.patternErrorMessage = schema.patternErrorMessage ||
11 > nls.localize('deprecatedVariables', "'env.', 'config.' and 'command.' are deprecated, use 'env:', 'config:' and 'command:' instead.");
12 > }