visual-studio-codevscode-extensions

How can I use setting values in launch config property values in VS Code?


I'm working on a VS Code extension where I need the launch.json configuration/program variable point to an extension setting. Is this possible?

I tried to use environment variables but without success.

I think to use a JavaScript to read the extension setting and pass it to the launch.json "configuration/program" variable.


Solution

  • You can use configuration variables, which are of the form ${config:<settingName>}. Ex. ${config:editor.fontSize}.