File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -198,7 +198,11 @@ class PhpDebugSession extends vscode.DebugSession {
198198 /** converts a server-side XDebug file URI to a local path for VS Code with respect to source root settings */
199199 protected convertDebuggerPathToClient ( fileUri : string ) : string {
200200 // convert the file URI to a path
201- const serverPath = decodeURI ( url . parse ( fileUri ) . pathname . substr ( 1 ) ) ;
201+ let serverPath = decodeURI ( url . parse ( fileUri ) . pathname ) ;
202+ // strip the trailing slash from Windows paths (indicated by a drive letter with a colon)
203+ if ( / ^ \/ [ a - z A - Z ] : \/ / . test ( serverPath ) ) {
204+ serverPath = serverPath . substr ( 1 ) ;
205+ }
202206 let localPath : string ;
203207 if ( this . _args . serverSourceRoot && this . _args . localSourceRoot ) {
204208 // get the part of the path that is relative to the source root
You can’t perform that action at this time.
0 commit comments