svaante / dape

Debug Adapter Protocol for Emacs
GNU General Public License v3.0
448 stars 25 forks source link

[Degradation] Cannot customize dape-configs using directory-local variables #84

Closed yoav-za closed 5 months ago

yoav-za commented 5 months ago

Directory-local variables are the proper way for setting per-project customizations in Emacs. One of the biggest advantages of dape vs dap-mode is its usage of variables to set debugging configuration, instead of using the less flexible launch.json file. Due to these facts, I'm using directory variables for per-project debugging configuration. However, after upgrading to a recent version, it seems that one cannot use directory variables for changing dape-configs anymore. I believe that the issue was introduced in the change https://github.com/svaante/dape/commit/e8bea3793b4540fe9b879d8bda8829868532156f where the configuration is now accessed in the context of a temporary buffer (dape--config-from-string). The solution would be to access the var dape-configs in the context of the current buffer, instead of the temporary one.

svaante commented 5 months ago

Hey, your absolutely right. It was that commit that introduced the regression.

Please check the commit above if the issue is solved on your end.

yoav-za commented 5 months ago

Thank you for your quick response, @svaante. I can confirm that the above change fixed the issue.