-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d8281f
commit 19150aa
Showing
8 changed files
with
251 additions
and
346 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,25 @@ | ||
'use strict'; | ||
|
||
// import * as vscode from 'vscode'; | ||
|
||
// This line should always be right on top. | ||
|
||
if ((Reflect as any).metadata === undefined) { | ||
require('reflect-metadata'); | ||
} | ||
|
||
import { registerDebugger } from './extensionInit'; | ||
import { IExtensionContext } from './common/types'; | ||
import { createOutputChannel, registerCommand } from './common/vscodeapi'; | ||
import { Commands } from './common/constants'; | ||
import { registerLogger, traceError, traceLog } from './common/log/logging'; | ||
import { registerLogger, traceError } from './common/log/logging'; | ||
import { sendTelemetryEvent } from './telemetry'; | ||
import { EventName } from './telemetry/constants'; | ||
import { IExtensionApi } from './apiTypes'; | ||
|
||
// this method is called when your extension is activated | ||
// your extension is activated the very first time the command is executed | ||
export async function activate(context: IExtensionContext): Promise<IExtensionApi> { | ||
let api: IExtensionApi; | ||
// Setup logging | ||
export async function activate(context: IExtensionContext): Promise<IExtensionApi | undefined> { | ||
const outputChannel = createOutputChannel('Python Debugger'); | ||
context.subscriptions.push(outputChannel, registerLogger(outputChannel)); | ||
context.subscriptions.push(registerCommand(Commands.ViewOutput, () => outputChannel.show())); | ||
|
||
traceLog(`Name: Python Debugger`); | ||
traceLog(`Module: debugpy`); | ||
|
||
try { | ||
api = await registerDebugger(context); | ||
const api = await registerDebugger(context); | ||
sendTelemetryEvent(EventName.DEBUG_SUCCESS_ACTIVATION); | ||
return api; | ||
} catch (ex) { | ||
traceError('sendDebugpySuccessActivationTelemetry() failed.', ex); | ||
throw ex; // re-raise | ||
} | ||
|
||
return api; | ||
} | ||
|
||
// this method is called when your extension is deactivated | ||
export function deactivate() {} |