Skip to content

Commit 8f97908

Browse files
jpfariasDonJayamanne
authored andcommitted
Fixes issue while trying to run / debug a pyramid application (#530)
The debugger tries to find pserve on all platforms but on windows the correct file name should be pserve.exe. Fixes #519
1 parent 4372809 commit 8f97908

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/client/debugger/Main.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import { DebugClient } from "./DebugClients/DebugClient";
2222
import { CreateAttachDebugClient, CreateLaunchDebugClient } from "./DebugClients/DebugFactory";
2323
import { BaseDebugServer } from "./DebugServers/BaseDebugServer";
2424
import { PythonProcess } from "./PythonProcess";
25+
import { IS_WINDOWS } from './Common/Utils';
2526

2627
const CHILD_ENUMEARATION_TIMEOUT = 5000;
2728

@@ -214,11 +215,12 @@ export class PythonDebugger extends DebugSession {
214215
catch (ex) {
215216
}
216217
if (Array.isArray(args.debugOptions) && args.debugOptions.indexOf("Pyramid") >= 0) {
218+
const pserve = IS_WINDOWS ? "pserve.exe" : "pserve";
217219
if (fs.existsSync(args.pythonPath)) {
218-
args.program = path.join(path.dirname(args.pythonPath), "pserve");
220+
args.program = path.join(path.dirname(args.pythonPath), pserve);
219221
}
220222
else {
221-
args.program = "pserve";
223+
args.program = pserve;
222224
}
223225
}
224226
// Confirm the file exists

0 commit comments

Comments
 (0)