File tree Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Expand file tree Collapse file tree 2 files changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,10 @@ class RobotCodeDebugConfigurationProvider implements vscode.DebugConfigurationPr
192192 ...( envPythonPath ? envPythonPath . split ( path . delimiter ) : [ ] ) ,
193193 ] . join ( path . delimiter ) ;
194194 debugConfiguration . env = env ;
195+ } else {
196+ this . pythonManager . outputChannel . appendLine (
197+ "WARNING: Failed to get debugpy path from extension. You need to manually install the debugpy package in your python environment." ,
198+ ) ;
195199 }
196200 }
197201 } else if ( debugConfiguration . request === "attach" ) {
Original file line number Diff line number Diff line change @@ -141,16 +141,16 @@ export class PythonManager {
141141
142142 public async getDebuggerPackagePath ( ) : Promise < string | undefined > {
143143 // TODO: this is not enabled in debugpy extension yet
144- // const debugpy = vscode.extensions.getExtension("ms-python.debugpy");
145- // if (debugpy !== undefined) {
146- // if (!debugpy.isActive) {
147- // await debugpy.activate();
148- // }
149- // const path = (debugpy.exports as PythonExtension)?.debug.getDebuggerPackagePath();
150- // if (path !== undefined) {
151- // return path;
152- // }
153- // }
144+ const debugpy = vscode . extensions . getExtension ( "ms-python.debugpy" ) ;
145+ if ( debugpy !== undefined ) {
146+ if ( ! debugpy . isActive ) {
147+ await debugpy . activate ( ) ;
148+ }
149+ const path = ( debugpy . exports as PythonExtension ) ?. debug . getDebuggerPackagePath ( ) ;
150+ if ( path !== undefined ) {
151+ return path ;
152+ }
153+ }
154154 return ( await this . getPythonExtension ( ) ) ?. debug . getDebuggerPackagePath ( ) ;
155155 }
156156
You can’t perform that action at this time.
0 commit comments