microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
src/debugger/direct/directSessionWrapper.ts
25lines · modecode
| 1 | // Copyright (c) Microsoft Corporation. All rights reserved. |
| 2 | // Licensed under the MIT license. See LICENSE file in the project root for details. |
| 3 | |
| 4 | import { ChromeDebugSession, IChromeDebugSessionOpts } from "vscode-chrome-debug-core"; |
| 5 | import { ReassignableTelemetryReporter } from "../../common/telemetryReporters"; |
| 6 | |
| 7 | export function makeDirectSession( |
| 8 | debugSessionOpts: IChromeDebugSessionOpts, |
| 9 | telemetryReporter: ReassignableTelemetryReporter |
| 10 | ): typeof ChromeDebugSession { |
| 11 | |
| 12 | return class extends ChromeDebugSession { |
| 13 | |
| 14 | private telemetryReporter: ReassignableTelemetryReporter; |
| 15 | |
| 16 | constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean) { |
| 17 | super(debuggerLinesAndColumnsStartAt1, isServer, debugSessionOpts); |
| 18 | this.telemetryReporter = telemetryReporter; |
| 19 | } |
| 20 | |
| 21 | public getTelemetryReporter(): ReassignableTelemetryReporter { |
| 22 | return this.telemetryReporter; |
| 23 | } |
| 24 | }; |
| 25 | } |
| 26 | |