[all-commits] [llvm/llvm-project] a5876b: [lldb-dap] Correct auto-completion based on ReplMo...

Adrian Vogelsgesang via All-commits all-commits at lists.llvm.org
Wed Oct 2 17:51:07 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a5876bef61e44453b915e1f79366ca1bbfdba371
      https://github.com/llvm/llvm-project/commit/a5876bef61e44453b915e1f79366ca1bbfdba371
  Author: Adrian Vogelsgesang <avogelsgesang at salesforce.com>
  Date:   2024-10-03 (Thu, 03 Oct 2024)

  Changed paths:
    M lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py
    M lldb/test/API/tools/lldb-dap/completions/TestDAP_completions.py
    M lldb/tools/lldb-dap/DAP.cpp
    M lldb/tools/lldb-dap/DAP.h
    M lldb/tools/lldb-dap/README.md
    M lldb/tools/lldb-dap/lldb-dap.cpp

  Log Message:
  -----------
  [lldb-dap] Correct auto-completion based on ReplMode and escape char (#110784)

This commit improves the auto-completion in the Debug Console provided
by VS-Code.

So far, we were always suggesting completions for both LLDB commands and
for variables / expressions, even if the heuristic already determined
how the given string will be executed, e.g., because the user explicitly
typed the escape prefix. Furthermore, auto-completion after the escape
character was broken, since the offsets were not adjusted correctly.
With this commit we now correctly take this into account.

Even with this commit, auto-completion does not always work reliably:

* VS Code only requests auto-completion after typing the first
alphabetic character, but not after punctuation characters. This means
that no completions are provided after typing "`"
* LLDB does not provide autocompletions if a string is an exact match.
This means if a user types `l` (which is a valid command), LLDB will not
provide "language" and "log" as potential completions. Even worse, VS
Code caches the completion and does client-side filtering. Hence, even
after typing `la`, no auto-completion for "language" is shown in the UI.

Those issues might be fixed in follow-up commits. Also with those known
issues, the experience is already much better with this commit.

Furthermore, I updated the README since I noticed that it was slightly
inaccurate.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list