-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use python debugger api (microsoft/vscode-python#23211)
- Use Python Debugger API - Use debugpy from Python Debugger - Remove debugpy
- Loading branch information
1 parent
1aac033
commit 4189286
Showing
22 changed files
with
82 additions
and
161 deletions.
There are no files selected for viewing
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
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
66 changes: 0 additions & 66 deletions
66
extensions/positron-python/python_files/install_debugpy.py
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
extensions/positron-python/python_files/tests/debug_adapter/__init__.py
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
extensions/positron-python/python_files/tests/debug_adapter/test_install_debugpy.py
This file was deleted.
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
30 changes: 30 additions & 0 deletions
30
extensions/positron-python/src/client/debugger/pythonDebugger.ts
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
import { extensions } from 'vscode'; | ||
|
||
interface IPythonDebuggerExtensionApi { | ||
debug: { | ||
getDebuggerPackagePath(): Promise<string>; | ||
}; | ||
} | ||
|
||
async function activateExtension() { | ||
const extension = extensions.getExtension('ms-python.debugpy'); | ||
if (extension) { | ||
if (!extension.isActive) { | ||
await extension.activate(); | ||
} | ||
} | ||
return extension; | ||
} | ||
|
||
async function getPythonDebuggerExtensionAPI(): Promise<IPythonDebuggerExtensionApi | undefined> { | ||
const extension = await activateExtension(); | ||
return extension?.exports as IPythonDebuggerExtensionApi; | ||
} | ||
|
||
export async function getDebugpyPath(): Promise<string> { | ||
const api = await getPythonDebuggerExtensionAPI(); | ||
return api?.debug.getDebuggerPackagePath() ?? ''; | ||
} |
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
Oops, something went wrong.