src/vs/workbench/contrib/debug/browser/debugEditorActions.ts/RunToCursorAction/run
class RunToCursorAction:	async run(accessor: ServicesAccessor, editor: ICodeEditor): Promise<void> {
		const debugService = accessor.get(IDebugService);
		const focusedSession = debugService.getViewModel().focusedSession;
		if (debugService.state !== State.Stopped || !focusedSession) {
			return;
		}

		const position = editor.getPosition();
		if (!(editor.hasModel() && position)) {
			return;
		}

		const uri = editor.getModel().uri;
		const bpExists = !!(debugService.getModel().getBreakpoints({ column: position.column, lineNumber: position.lineNumber, uri }).length);

		let breakpointToRemove: IBreakpoint | undefined;
		let threadToContinue = debugService.getViewModel().focusedThread;
		if (!bpExists) {
			const addResult = await this.addBreakpoints(accessor, uri, position);
			if (addResult.thread) {
				threadToContinue = addResult.thread;
			}

			if (addResult.breakpoint) {
				breakpointToRemove = addResult.breakpoint;
			}
		}

		if (!threadToContinue) {
			return;
		}

		const oneTimeListener = threadToContinue.session.onDidChangeState(() => {
			const state = focusedSession.state;
			if (state === State.Stopped || state === State.Inactive) {
				if (breakpointToRemove) {
					debugService.removeBreakpoints(breakpointToRemove.getId());
				}
				oneTimeListener.dispose();
			}
		});

		await threadToContinue.continue();
	}