Skip to content
Discussion options

You must be logged in to vote

Hey! The issue is that nextest runs the debugger via Command::new, not through a shell, so your bash function rust-gdb-tmux isnt found. Functions and aliases only exist in interactive shells.

Fix: convert the function to an executable script and place it in your PATH. For example:

  1. Create ~/bin/rust-gdb-tmux:
#!/usr/bin/env bash
id="$(tmux split-pane -hPF "#D" "tail -f /dev/null")"
tmux last-pane
tty="$(tmux display-message -p -t "$id" "#{pane_tty}")"
exec rust-gdb -ex "dashboard -output $tty" "$@"

Make it executable: chmod +x ~/bin/rust-gdb-tmux

  1. Use it with nextest:
cargo nextest run --debugger "rust-gdb-tmux" my_test

Or provide the full path if not on PATH.

Alternatively, you could use:

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ThatGeoGuy
Comment options

Answer selected by ThatGeoGuy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants