@@ -16,8 +16,7 @@ import { IApplicationShell } from '../../../common/application/types';
16
16
import { EXTENSION_ROOT_DIR } from '../../../constants' ;
17
17
import { IInterpreterService } from '../../../interpreter/contracts' ;
18
18
import { traceLog , traceVerbose } from '../../../logging' ;
19
- import { Conda } from '../../../pythonEnvironments/common/environmentManagers/conda' ;
20
- import { EnvironmentType , PythonEnvironment } from '../../../pythonEnvironments/info' ;
19
+ import { PythonEnvironment } from '../../../pythonEnvironments/info' ;
21
20
import { sendTelemetryEvent } from '../../../telemetry' ;
22
21
import { EventName } from '../../../telemetry/constants' ;
23
22
import { AttachRequestArguments , LaunchRequestArguments } from '../../types' ;
@@ -143,40 +142,8 @@ export class DebugAdapterDescriptorFactory implements IDebugAdapterDescriptorFac
143
142
return this . getExecutableCommand ( interpreters [ 0 ] ) ;
144
143
}
145
144
146
- private async getCondaCommand ( ) : Promise < Conda | undefined > {
147
- const condaCommand = await Conda . getConda ( ) ;
148
- const isCondaRunSupported = await condaCommand ?. isCondaRunSupported ( ) ;
149
- return isCondaRunSupported ? condaCommand : undefined ;
150
- }
151
-
152
145
private async getExecutableCommand ( interpreter : PythonEnvironment | undefined ) : Promise < string [ ] > {
153
146
if ( interpreter ) {
154
- if ( interpreter . envType === EnvironmentType . Conda ) {
155
- const condaCommand = await this . getCondaCommand ( ) ;
156
- if ( condaCommand ) {
157
- if ( interpreter . envName ) {
158
- return [
159
- condaCommand . command ,
160
- 'run' ,
161
- '-n' ,
162
- interpreter . envName ,
163
- '--no-capture-output' ,
164
- '--live-stream' ,
165
- 'python' ,
166
- ] ;
167
- } else if ( interpreter . envPath ) {
168
- return [
169
- condaCommand . command ,
170
- 'run' ,
171
- '-p' ,
172
- interpreter . envPath ,
173
- '--no-capture-output' ,
174
- '--live-stream' ,
175
- 'python' ,
176
- ] ;
177
- }
178
- }
179
- }
180
147
return interpreter . path . length > 0 ? [ interpreter . path ] : [ ] ;
181
148
}
182
149
return [ ] ;
0 commit comments