Skip to content

pathSubstitutions not working for lldb-mi #466

Open

Description

@mtsre

The debugger tries to open a source file from the target path that should have been substituted.
The tab opened by the debugger says: "The editor could not be opened because the file was not found.", with the following path:
C:\program files (x86)\embarcadero\studio\37.0\lib\Win64\debug\System.Classes.pas.

Here is my launch.json with path substitution:

{
    "configurations": [
        {
            "name": "lldb-mi-launch",
            "type": "lldb-mi",
            "request": "launch",
            "cwd": "${workspaceFolder}/Win64/Debug",
            "target": "App.exe",
            "valuesFormatting": "prettyPrinters",
            "lldbmipath": "C:/Program Files (x86)/Embarcadero/Studio/37.0/bin/windows/lldb/lldb-mi.exe",
            "pathSubstitutions": {
                "\"C:/Program Files (x86)/Embarcadero/Studio/37.0/lib/Win64/debug\"": "\"C:/Program Files (x86)/Embarcadero/Studio/37.0/source/rtl/common\""
            }
        }
    ],
}

I noticed pathSubstitutions needs paths with spaces quoted or have their spaces escaped, so they won't get split.
I also tried double escaping spaces instead of quoting and using the exact case sensitivity for the target path with the same outcome.
Also tried to get windows style path with back slashes to work but gave up.

settings show target.source-map
target.source-map (path-map) =
[0] "C:\program files (x86)\embarcadero\Studio\37.0\lib\Win64\debug" -> "C:\Program Files (x86)\Embarcadero\Studio\37.0\source\rtl\common"

The debugger seems to have the right mapping but still opens source files from the target path and does not substitute them.

I'm not sure if this is a problem with the custom lldb-mi I'm using and unfortunately I cannot test this right now, so any help appreciated.

Thanks for the project and the time invested.
Best Regards

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions