src/vs/workbench/contrib/debug/browser/debugEditorActions.ts/SelectionToWatchExpressionsAction/run
class SelectionToWatchExpressionsAction:	async run(accessor: ServicesAccessor, editor: ICodeEditor): Promise<void> {
		const debugService = accessor.get(IDebugService);
		const viewsService = accessor.get(IViewsService);
		if (!editor.hasModel()) {
			return;
		}

		const text = editor.getModel().getValueInRange(editor.getSelection());
		await viewsService.openView(WATCH_VIEW_ID);
		debugService.addWatchExpression(text);
	}