Bug 426399

Summary: Local path remote protocols saved wrong in path mapping
Product: [Developer tools] kdevplatform Reporter: kinta <aleixq>
Component: debuggerAssignee: kdevelop-bugs-null
Status: REPORTED ---    
Severity: normal CC: niko.sams
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description kinta 2020-09-11 10:33:35 UTC
SUMMARY
Working in a php web project I was looking to use xdebug kdevelop plugin, I found that I need to obtain the whole web project and then set the pathmapping to the Local root path of the project mapped to remote root path of the project, this way everything works as should.
But I think it will be great to be able use the pathmapping without fetching everything, in fact without fetching anything and work remotely with any kio protocol such as fish.

It's possible when setting the path mappings manually in .kdev4 configuration file instead of using the path mappings dialog, at least for a xdebug launcher.

So we can use:

[Launch][Launch Configuration 0][Data][Path Mappings][1]
Local=fish://user@domain/var/www/webx/
Remote=file:///var/www/webx/

and debugging session is working great.

If using the dialog configuration is written as this:

[Launch][Launch Configuration 0][Data][Path Mappings][1]
Local=file:///fish://user@domain/var/www/webx/
Remote=file:///var/www/webx/

STEPS TO REPRODUCE
1. Start a php project
2. Set a browsser launcher and Set the xdebug debugger path mapping: local as fish location, remote as file location

OBSERVED RESULT
The PathMappings::convertToRemoteUrl is setting the wrong url. I suspect that something wrong in kdevplatform/debugger/util/pathmappings.cpp 


EXPECTED RESULT
Save the local mapping respecting the protocol.


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: Archlinux
(available in About System)
KDE Plasma Version: 5.19.5 
KDE Frameworks Version: 5.73
Qt Version: 5.15.0