vadimcn / codelldb

A native debugger extension for VSCode based on LLDB
https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb
MIT License
2.42k stars 237 forks source link

Allow lldb.rpcServer.path interpolation #1090

Closed dpar39 closed 3 months ago

dpar39 commented 3 months ago

I'd like to create a Unix domain socket using a path relative to the workspace. That way every instance of VSCode can have a separate RPC socket. Can the extension add interpolation of ${workspaceFolder} to the option.path string?

If I hardcode the full path then the socket file gets created as expected.

"lldb.rpcServer": {
        //"port": 12345,
        //"host": "127.0.0.1",
        "path": "${workspaceFolder}/codelldb_rpc.sock"
    },
vadimcn commented 3 months ago

VSCode deals with interpolation in config settings, so it'd be a feature request for them.
As a workaround, you can store this setting in per-workspace settings

dpar39 commented 3 months ago

VSCode does not deal with interpolation in settings.json, only in tasks.json and launch.json. Can you at least consider an environment variable to avoid having to hardcore a port or a path? Many people have copies of the same repo open in different vscode instances to avoid having to switch branches constantly and rebuild the code.

puremourning commented 3 months ago

In vimspector I created ${UnusedLocalPort} for this purpose. I suggest raising an enhancement requests to VSCode to implement something similar.

catskul commented 3 months ago

IIRC the VSCode devs have said it's up to each extension to handle their own expansions.