Skip to content

Commit f22b451

Browse files
author
jpfarias
committed
Fixes issue #523 while trying to run / debug a pyramid web application on windows platform
1 parent 4372809 commit f22b451

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/client/debugger/Main.ts

Lines changed: 7 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,15 @@ export class PythonDebugger extends DebugSession {
214215
catch (ex) {
215216
}
216217
if (Array.isArray(args.debugOptions) && args.debugOptions.indexOf("Pyramid") >= 0) {
218+
let pserve = "pserve";
219+
if (IS_WINDOWS) {
220+
pserve = "pserve.exe";
221+
}
217222
if (fs.existsSync(args.pythonPath)) {
218-
args.program = path.join(path.dirname(args.pythonPath), "pserve");
223+
args.program = path.join(path.dirname(args.pythonPath), pserve);
219224
}
220225
else {
221-
args.program = "pserve";
226+
args.program = pserve;
222227
}
223228
}
224229
// Confirm the file exists

0 commit comments

Comments
 (0)