Build your application with the debug profile. This is done by omitting the --release argument.
cargo build
sudo apt-get install gdbserver
gdbserver :1234 /path/to/your/rust_executable