Skip to content

Commit

Permalink
debug.allowBreakpointsEverywhere
Browse files Browse the repository at this point in the history
fixes #13507
  • Loading branch information
isidorn committed Oct 14, 2016
1 parent 58f07b4 commit 4b559a8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/vs/workbench/parts/debug/common/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ export enum State {
RunningNoDebug
}

// Service config

export interface IDebugConfiguration {
allowBreakpointsEverywhere: boolean;
}

// service interfaces

export interface IGlobalConfig {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRe
import { IKeybindings } from 'vs/platform/keybinding/common/keybinding';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors';
import * as confregistry from 'vs/platform/configuration/common/configurationRegistry';
import wbaregistry = require('vs/workbench/common/actionRegistry');
import viewlet = require('vs/workbench/browser/viewlet');
import panel = require('vs/workbench/browser/panel');
Expand Down Expand Up @@ -164,3 +165,19 @@ registerSingleton(IDebugService, service.DebugService);
'DebugErrorEditor'),
[new SyncDescriptor(DebugErrorEditorInput)]
);

// Register configuration
const configurationRegistry = <confregistry.IConfigurationRegistry>platform.Registry.as(confregistry.Extensions.Configuration);
configurationRegistry.registerConfiguration({
id: 'debug',
order: 20,
title: nls.localize('debugConfigurationTitle', "Debug"),
type: 'object',
properties: {
'debug.allowBreakpointsEverywhere': {
type: 'boolean',
description: nls.localize('allowBreakpointsEverywhere', "Allows setting breakpoints for all files, no matter the extension."),
default: false
}
}
});
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { IFileService } from 'vs/platform/files/common/files';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import debug = require('vs/workbench/parts/debug/common/debug');
import * as debug from 'vs/workbench/parts/debug/common/debug';
import { Adapter } from 'vs/workbench/parts/debug/node/debugAdapter';
import { IWorkbenchEditorService } from 'vs/workbench/services/editor/common/editorService';
import { IQuickOpenService } from 'vs/workbench/services/quickopen/common/quickOpenService';
Expand Down Expand Up @@ -343,6 +343,9 @@ export class ConfigurationManager implements debug.IConfigurationManager {
if (model.uri.scheme === Schemas.inMemory) {
return false;
}
if (this.configurationService.getConfiguration<debug.IDebugConfiguration>('debug').allowBreakpointsEverywhere) {
return true;
}

const mode = model ? model.getMode() : null;
const modeId = mode ? mode.getId() : null;
Expand Down

0 comments on commit 4b559a8

Please sign in to comment.