當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript vscode-chrome-debug-core.ChromeDebugSession類代碼示例

本文整理匯總了TypeScript中vscode-chrome-debug-core.ChromeDebugSession的典型用法代碼示例。如果您正苦於以下問題:TypeScript ChromeDebugSession類的具體用法?TypeScript ChromeDebugSession怎麽用?TypeScript ChromeDebugSession使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了ChromeDebugSession類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: require

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/

import {ChromeDebugSession, logger} from 'vscode-chrome-debug-core';
import * as path from 'path';

// Start a ChromeDebugSession configured to only match 'page' targets, which are Chrome tabs
ChromeDebugSession.run(ChromeDebugSession.getSession(
    {
        targetFilter: target => target && (!target.type || target.type === 'page'),
        logFileDirectory: path.resolve(__dirname, '../../')
    }));

/* tslint:disable:no-var-requires */
logger.log('debugger-for-chrome: ' + require('../../package.json').version);
開發者ID:lijunle,項目名稱:vscode-chrome-debug,代碼行數:16,代碼來源:chromeDebug.ts

示例2:

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/

import {ChromeDebugSession} from 'vscode-chrome-debug-core';

ChromeDebugSession.run(ChromeDebugSession);
開發者ID:Grax32,項目名稱:vscode-chrome-debug,代碼行數:7,代碼來源:chromeDebug.ts

示例3: require

import { ChromeDebugSession, logger, UrlPathTransformer, BaseSourceMapTransformer, telemetry } from 'vscode-chrome-debug-core';
import * as path from 'path';
import * as os from 'os';
import { targetFilter } from './utils';

import { ChromeDebugAdapter } from './chromeDebugAdapter';

const EXTENSION_NAME = 'debugger-for-chrome';

// Start a ChromeDebugSession configured to only match 'page' targets, which are Chrome tabs.
// Cast because DebugSession is declared twice - in this repo's vscode-debugadapter, and that of -core... TODO
ChromeDebugSession.run(ChromeDebugSession.getSession(
    {
        adapter: ChromeDebugAdapter,
        extensionName: EXTENSION_NAME,
        logFilePath: path.resolve(os.tmpdir(), 'vscode-chrome-debug.txt'),
        targetFilter,

        pathTransformer: UrlPathTransformer,
        sourceMapTransformer: BaseSourceMapTransformer,
    }));

/* tslint:disable:no-var-requires */
const debugAdapterVersion = require('../../package.json').version;
logger.log(EXTENSION_NAME + ': ' + debugAdapterVersion);

/* __GDPR__FRAGMENT__
    "DebugCommonProperties" : {
        "Versions.DebugAdapter" : { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
    }
*/
telemetry.telemetry.addCustomGlobalProperty({'Versions.DebugAdapter': debugAdapterVersion});
開發者ID:snailuncle,項目名稱:vscode-chrome-debug,代碼行數:32,代碼來源:chromeDebug.ts

示例4:

/*---------------------------------------------------------
 * Copyright (C) Microsoft Corporation. All rights reserved.
 *--------------------------------------------------------*/

import {ChromeDebugSession} from 'vscode-chrome-debug-core';
import {EdgeDebugSession} from './edgeDebugSession';

ChromeDebugSession.run(EdgeDebugSession);
開發者ID:Microsoft,項目名稱:vscode-edge-debug,代碼行數:8,代碼來源:edgeDebug.ts


注:本文中的vscode-chrome-debug-core.ChromeDebugSession類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。