@@ -641,7 +641,7 @@ class PhpDebugSession extends vscode.DebugSession {
641641 if ( status . exception ) {
642642 const variableId = this . _variableIdCounter ++ ;
643643 this . _errorScopes . set ( variableId , status ) ;
644- scopes = [ new vscode . Scope ( status . exception . name , variableId ) ] ;
644+ scopes = [ new vscode . Scope ( status . exception . name . replace ( / ^ ( . * \\ ) + / g , '' ) , variableId ) ] ;
645645 }
646646 } else {
647647 const stackFrame = this . _stackFrames . get ( args . frameId ) ;
@@ -658,7 +658,7 @@ class PhpDebugSession extends vscode.DebugSession {
658658 if ( status && status . exception ) {
659659 const variableId = this . _variableIdCounter ++ ;
660660 this . _errorScopes . set ( variableId , status ) ;
661- scopes . unshift ( new vscode . Scope ( status . exception . name , variableId ) ) ;
661+ scopes . unshift ( new vscode . Scope ( status . exception . name . replace ( / ^ ( . * \\ ) + / g , '' ) , variableId ) ) ;
662662 }
663663 }
664664 response . body = { scopes} ;
@@ -677,7 +677,7 @@ class PhpDebugSession extends vscode.DebugSession {
677677 // this is a virtual error scope
678678 const status = this . _errorScopes . get ( variablesReference ) ;
679679 variables = [
680- new vscode . Variable ( 'name ' , '"' + status . exception . name + '"' ) ,
680+ new vscode . Variable ( 'type ' , status . exception . name ) ,
681681 new vscode . Variable ( 'message' , '"' + status . exception . message + '"' )
682682 ] ;
683683 if ( status . exception . code !== undefined ) {
0 commit comments