svaante / dape

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

dape-on-stopped-hooks documentation mismatch #46

Closed akurth closed 9 months ago

akurth commented 10 months ago

According to the docstring, dape-on-stopped-hooks will be called upon session termination; at least that’s how I understand it. However, it is called upon every "stopped" event, e.g. breakpoint halt.

I tried to use dape-on-start-hooks/dape-on-stopped-hooks to enable/disable repeat-mode for dape. Unfortunately upon the first "stopped" event (breakpoint halt) repeat-mode gets disabled due to the described behaviour.

I think the dape-on-stopped-hooks docstring should be modified to clearly state this behaviour, and/or – even better – a real dape-on-session-terminated-hook should be established, which could be called upon dape-kill, for example.

svaante commented 9 months ago

Documentation could be better but it states "Hook to run on session stopped." which is not terminated but stopped. But the #48 will add something for disabling repeat mode.

akurth commented 9 months ago

Now that dape-active-mode-hook exists, this is fixed for me. Thanks a lot!