Skip to content

Improved Path Detection #21

Closed
Closed

Description

@ubadineke

Describe the bug
The debugger fails to detect the solana-lldb binary on certain systems where the binary is not installed in the default path being used in the extension.js file, specifically on my Arch Linux.

gimlet/extension.js

Lines 25 to 40 in 04e4385

const solanalldbPath = path.join(
homeDir,
".local",
"share",
"solana",
"install",
"active_release",
"bin",
"sdk",
"sbf",
"dependencies",
"platform-tools",
"llvm",
"bin",
"solana-lldb"
);

This makes debugging impossible unless the user manually sets or symlinks the correct path.

To Reproduce
Steps to reproduce the behavior:

  1. Install Solana CLI and build Solana programs on a system (e.g., Arch Linux) using cargo build-sbf.
  2. Attempt to launch the debugger via Gimlet.
  3. Observe that solana-lldb is not detected, and debugging fails to initialize.

Expected behavior:
The debugger should fall back to alternative detection strategies for solana-lldb if the default path check fails, making it more robust across various development setups.
Enhance solana-lldb detection by incorporating the following fallback strategies:

  • System PATH detection – Check if solana-lldb exists in the system PATH.
  • Cache-based detection – Attempt to locate it within the project's ./cache/solana/ directory, which is usually populated after a successful cargo build-sbf.

These additions will make the tool more resilient to differences in Solana setup environments.

Screenshots
N/A

Environment:

  • OS: Arch Linux
  • Solana CLI: 2.1.20
  • Rust(shipped with Agave platform tools): 1.79.0
  • Rust Toolchain: stable-x86_64-unknown-linux-gnu
  • Rust(my system): 1.86.0
  • Extension Version: v0.0.5
  • VS Code Version: 1.99.2

Additional context
On my Arch Linux setup, the current hardcoded detection strategy did not locate the binary.
However, I found solana-lldb at: ./cache/solana/<PLATFORM_TOOLS_VERSION>/platform-tools/llvm/bin/solana-lldb

Activity

  1. failfmi commented on Aug 15, 2025

    @failfmi
    Collaborator

    Resolved in 0.0.9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions