File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,8 @@ export function debugYaml(pykisoConfigPath: vscode.Uri) {
2424 module : "pykiso" ,
2525 justMyCode : false ,
2626 args : [ "-c" , pykisoConfigPath . fsPath ] ,
27+ cwd : pykisoConfigPath . path . substring ( 0 , pykisoConfigPath . path . lastIndexOf ( '/' ) ) ,
28+ purpose : [ "debug-in-terminal" ]
2729 } ;
2830
2931 vscode . debug . startDebugging ( workspaceFolder , pykisoDebugConfig ) ;
Original file line number Diff line number Diff line change @@ -23,17 +23,25 @@ export class PykisoRunner {
2323 var activeFile = filePath ! . split ( "\\" ) . pop ( ) ! . split ( "/" ) . pop ( ) ;
2424 this . updatePythonInterpreter ( ) ;
2525
26+ var filePathUri = vscode . Uri . parse ( filePath ) ;
27+
2628 if ( ! debug ) {
27- var terminal = vscode . window . createTerminal (
28- `Pykiso #${ this . nextTermID ++ } ${ activeFile } `
29- ) ;
29+ const terminalOptions = {
30+ name : `Pykiso #${ this . nextTermID ++ } ${ activeFile } ` ,
31+ cwd : filePathUri . path . substring ( 0 , filePathUri . path . lastIndexOf ( '/' ) ) ,
32+ } ;
33+
34+ var terminal = vscode . window . createTerminal ( terminalOptions ) ;
3035 terminal . sendText (
3136 `${ this . pythonInterpreterPath } -m pykiso -c \"${ filePath } \"`
3237 ) ;
3338 } else {
34- var terminal = vscode . window . createTerminal (
35- `Pykiso DEBUG #${ this . nextTermID ++ } ${ activeFile } `
36- ) ;
39+ const terminalOptions = {
40+ name : `Pykiso DEBUG #${ this . nextTermID ++ } ${ activeFile } ` ,
41+ cwd : filePathUri . path . substring ( 0 , filePathUri . path . lastIndexOf ( '/' ) ) ,
42+ } ;
43+
44+ var terminal = vscode . window . createTerminal ( terminalOptions ) ;
3745 terminal . sendText (
3846 `${ this . pythonInterpreterPath } -m pykiso -c \"${ filePath } \" --log-level DEBUG`
3947 ) ;
You can’t perform that action at this time.
0 commit comments