File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -276,7 +276,8 @@ class PhpDebugSession extends vscode.DebugSession {
276276 )
277277 if ( script ) {
278278 // we only do this for CLI mode. In normal listen mode, only a thread exited event is send.
279- script . on ( 'exit' , ( ) => {
279+ script . on ( 'exit' , ( code : number | null ) => {
280+ this . sendEvent ( new vscode . ExitedEvent ( code ?? 0 ) )
280281 this . sendEvent ( new vscode . TerminatedEvent ( ) )
281282 } )
282283 }
@@ -293,7 +294,8 @@ class PhpDebugSession extends vscode.DebugSession {
293294 this . sendEvent ( new vscode . OutputEvent ( data + '' , 'stderr' ) )
294295 } )
295296 // we only do this for CLI mode. In normal listen mode, only a thread exited event is send.
296- script . on ( 'exit' , ( ) => {
297+ script . on ( 'exit' , ( code : number | null ) => {
298+ this . sendEvent ( new vscode . ExitedEvent ( code ?? 0 ) )
297299 this . sendEvent ( new vscode . TerminatedEvent ( ) )
298300 } )
299301 script . on ( 'error' , ( error : Error ) => {
You can’t perform that action at this time.
0 commit comments