Skip to content

feat: add btcli utils debug command for debugging info dump#757

Closed
mimalsm wants to merge 1 commit intoopentensor:stagingfrom
mimalsm:feat/utils-debug-command
Closed

feat: add btcli utils debug command for debugging info dump#757
mimalsm wants to merge 1 commit intoopentensor:stagingfrom
mimalsm:feat/utils-debug-command

Conversation

@mimalsm
Copy link

@mimalsm mimalsm commented Dec 15, 2025

Implements GitHub issue #184 - adds a new 'btcli utils debug' command that provides a comprehensive information dump for debugging purposes.

Features:

  • System information display (OS version, kernel version, Python version) with cross-platform support (macOS, Linux, Windows)
  • Last run command extraction from debug file
  • Configuration display with smart filtering:
    • Always shows essential config keys (wallet_name, wallet_path, wallet_hotkey, network, use_cache)
    • Only shows other config keys when they have meaningful values
  • Graceful fallback when debug file doesn't exist
  • Respects BTCLI_DEBUG_FILE environment variable

The command helps users quickly gather debugging information to share with developers when reporting issues, matching the format requested in the issue.

Implementation details:

  • Added debug() method to CLIManager class
  • Registered command with utils_app
  • Uses platform-specific commands (sw_vers, uname) with fallbacks
  • Safely parses config from debug file using ast.literal_eval
  • Filters config output to reduce clutter while maintaining essential info

Closes #184

Implements GitHub issue opentensor#184 - adds a new 'btcli utils debug' command that
provides a comprehensive information dump for debugging purposes.

Features:
- System information display (OS version, kernel version, Python version)
  with cross-platform support (macOS, Linux, Windows)
- Last run command extraction from debug file
- Configuration display with smart filtering:
  * Always shows essential config keys (wallet_name, wallet_path,
    wallet_hotkey, network, use_cache)
  * Only shows other config keys when they have meaningful values
- Graceful fallback when debug file doesn't exist
- Respects BTCLI_DEBUG_FILE environment variable

The command helps users quickly gather debugging information to share with
developers when reporting issues, matching the format requested in the issue.

Implementation details:
- Added debug() method to CLIManager class
- Registered command with utils_app
- Uses platform-specific commands (sw_vers, uname) with fallbacks
- Safely parses config from debug file using ast.literal_eval
- Filters config output to reduce clutter while maintaining essential info
@mimalsm
Copy link
Author

mimalsm commented Dec 15, 2025

image

@mimalsm
Copy link
Author

mimalsm commented Dec 16, 2025

@thewhaleking can you run the workflows?

Copy link
Contributor

@thewhaleking thewhaleking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality already exists in btcli --debug

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants