<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95137>95137</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[lldb-dap] Make `env` and `sourceMap ` dictionaries
</td>
</tr>
<tr>
<th>Labels</th>
<td>
lldb,
lldb-dap
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
JDevlieghere
</td>
</tr>
</table>
<pre>
[The documentation](https://github.com/llvm/llvm-project/blob/main/lldb/tools/lldb-dap/README.md) specifies that the `env` configuration setting is a dictionary, but as seen in the examples, it really is an array consisting of `key=value`.
```
{
"env": [ "FOO=1", "BAR" ],
}
```
It would be much more intuitive to make this an actual JSON dictionary. Similarly, `sourceMap`, although documented correctly as a `[string[2]]`, could benefit from this as well.
```
{
"env": {
"foo": "1",
"bar": ""
},
"sourceMap": {
"/path/to/foo": "/path/to/bar",
"/path/to/baz": "/path/to/quux"
}
}
```
Not only is that a lot more readable, it's also easier to comment out certain environment variables or path remappings in `launch.json`.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJycVNuO2zYQ_RrqZRBDpC3ZftCDvYqBBtgskPQHRtRYYkKRLi9O3K8vSMnrZJsCbQFB9gw5Zy46c9B7NRiihlVHVrUFxjBa13xo6aoVDSM5Kjrb39L57yNBb2WcyAQMyhpWtUzsxhAunq0PTJyYOA0qjLFbSTsxcdL6ev95d3H2C8nAxKnTtmPiNKEy-bBPVrBW-8V81-OFidOn94f2-f1q6pnYg7-QVGdFHsKIAcJIwOqSzJXVJUhrzmqILlcFnkJQZgDlAaFXMjnR3Zh4gi4GQA-eyIAyGYW-43TR5NOxCuAItb7lWAPoHN4Sulc-Q9pzyvqVbmzdXlFHYnW5Ala2rDws77pcntncHuc_AEyIVK4QbH0AVh2T4_TywtYtT07xlBzHwycmBOTJPt0h2l9D5_dvAb7ZqHvoCKYoR5isI1AmRBXUlSBYmPArQRiXlmSIqOHD55ePP8xmBZ_VpDQ6ncfE6tLb6CQ94yXlE0-AOow2DuMrA6gHaZ0jGfQtzRRTFKuOPjhlBlYdRWqiapd4uRRp6KwCnJ2dlpI8fCOt_98QX_1MiLO1d7cQy0TvUTmuQ_e4kJ475Lb94SoT4tH6L9IwcbpgGDNjmTj9lPXN2ZLwTRl_u_TnPwL8EeP3N4X-C0Z8tAGsmTmcdwVB2zDzwhH22Gmayc7E1gNqb4HQK3KJLNJO6euCjQEkuYDKAJmrctZk_xWdSggerINULDia8HJRZvBppVhdaoxGjqsv3pq8HkXfrPv9eo8FNXzLd1yIalsVY1MRx65frzeSy_Lc7aje8_2mrHelrGrOsVCNKMWmrDnnNa95tao4x_P2XO53tOEVcrYpaUKlV0liVtYNhfI-UrOv-HpbaOxI-yxtQsw6kz_HbMwqk1hauCZLVBcHzzalVj74B2JQQWd9fA2qWnhOO_UQIDT9T0uTjMd6KfJFdLr5z0qZm0mqOPdzbcRfAQAA___vGrBv">