svaante / dape

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

[degradation] Dape does not change state to "running" on lldb-vscode #107

Closed yoav-za closed 3 months ago

yoav-za commented 3 months ago

Dape does not change state to "running" on lldb-vscode. May be happening on other lldb or gdb based adapters. Steps for reproduction:

  1. Configure debugged program:
    (setq dape-configs 
              ( ( run-program
                  modes ( c-mode c-ts-mode c++-mode c++-ts-mode rust-mode rust-ts-mode)
                  ensure
                  dape-ensure-command
                  command
                  "lldb-vscode"
                  :type "lldb-vscode"
                  :cwd "<some_dir_path>"
                  :program "<bin_path>")))
  2. Set a breakpoint in code.
  3. Execute dape with the run-program configuration and wait for the breakpoint to hit.
  4. Execute dape-continue.

Expected behavior: UI signals that the program is executing, with a status line showing that the program is running and the current line indicator (fringe) is cleared.

Observed behavior: UI does not indicate that the program is executing. Status bar keep showing "stopped/breakpoint" status. Current line indicator is still there. The program is continued, and can be stopped again.

This is a recent degradation (some commit in the past 2 months). I suspect that https://github.com/svaante/dape/commit/de359a37902a98701eebd3453176c93e015e5feb may be related.

svaante commented 3 months ago

Thanks nice find, please get back to me if cb2f164 fixed your issue.

For future reference from the DAP spec:

Please note: a debug adapter is not expected to send this event in response to a request that implies that execution continues, e.g. launch or continue.

yoav-za commented 3 months ago

I can confirm that the fix works.

Thank you very much for the quick response!