Skip to content

Validate critical paths (liblldb, debugserver/lldb-server) and improve error messages #1376

@vaporif

Description

@vaporif

When critical paths like LLDB_DEBUGSERVER_PATH or liblldb point to non-existent files, lldb errors are cryptic and don't indicate the actual problem.

Example error when debugserver is missing:
executable doesn't exist: '(empty)'

Affected paths

  • lldb.library (liblldb) - passed via --liblldb flag
  • lldb.server (debugserver on macOS, lldb-server on Linux) - passed via LLDB_DEBUGSERVER_PATH env var

Current behavior

  • No validation before launching adapter
  • Error messages don't indicate which dependency is missing

Suggested improvement

Validate paths exist before spawning adapter. If missing, return helpful error:

liblldb not found at ''. Check your lldb.library setting.

debugserver/lldb-server not found at ''. Check your lldb.server setting or install debugging tools.

References

Similar pattern already exists for workDir validation in adapter.ts.

Related: #999 (debugserver issues on macOS)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions