microsoft/vscode-react-native

Public

mirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
0.13.0

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

src/debugger/direct/directSessionWrapper.ts

25lines · modepreview

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for details.

import { ChromeDebugSession, IChromeDebugSessionOpts } from "vscode-chrome-debug-core";
import { ReassignableTelemetryReporter } from "../../common/telemetryReporters";

export function makeDirectSession(
    debugSessionOpts: IChromeDebugSessionOpts,
    telemetryReporter: ReassignableTelemetryReporter
    ): typeof ChromeDebugSession {

    return class extends ChromeDebugSession {

        private telemetryReporter: ReassignableTelemetryReporter;

        constructor(debuggerLinesAndColumnsStartAt1?: boolean, isServer?: boolean) {
            super(debuggerLinesAndColumnsStartAt1, isServer, debugSessionOpts);
            this.telemetryReporter = telemetryReporter;
        }

        public getTelemetryReporter(): ReassignableTelemetryReporter {
            return this.telemetryReporter;
        }
    };
}