File tree 2 files changed +14
-10
lines changed
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
192
192
...( envPythonPath ? envPythonPath . split ( path . delimiter ) : [ ] ) ,
193
193
] . join ( path . delimiter ) ;
194
194
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
+ ) ;
195
199
}
196
200
}
197
201
} else if ( debugConfiguration . request === "attach" ) {
Original file line number Diff line number Diff line change @@ -141,16 +141,16 @@ export class PythonManager {
141
141
142
142
public async getDebuggerPackagePath ( ) : Promise < string | undefined > {
143
143
// 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
+ }
154
154
return ( await this . getPythonExtension ( ) ) ?. debug . getDebuggerPackagePath ( ) ;
155
155
}
156
156
You can’t perform that action at this time.
0 commit comments