Nothing Happens when I click [Stop] button in the debugger -- Why?
Code: Select all
cmd$ = "powershell.exe"
paaram$ = "(curl https://www.purebasic.com/documentation/reference/ide_commandline.html).Content"
exe = RunProgram(cmd$,param$,"", 2 | 4 | 8) ;
Output$ = ""
If exe
Debug "Something"
While ProgramRunning(exe)
Output$ + ReadProgramString(exe) + Chr(13)
er$ = ReadProgramError(exe)
Debug er$
Wend
Debug Output$
; Output$ + Chr(13) + Chr(13)
; Output$ = "Exitcode: " + Str(ProgramExitCode(exe))
;Debug "-------------------------"
EndIf
Debug Output$
Found the problem I think. Stupid me again. I had "paarm$ = ..." instead of "param$ = ..."
Fixed that typo and program finishes execution almopst immediately... DUH!!
(how do you all put up with me?)