External terminal cannot be launched after 6782b09
### Debug adapter definition and debug configuration
```
dap.defaults.fallback.external_terminal = {
command = vim.fn.expand("~/.tmux/tmux_dap_split.sh"),
}
```
The contents of the script are the following:
```
#!/bin/bash
command=""
for arg in "$@"; do
command="$command $arg"
done
dap_pane_id="$(tmux show -g @dap_pane_id | awk -F'"' '{print $2}')"
dap_pane_exists="$(tmux has -t $dap_pane_id 2>/dev/null && echo 1)"
if [[ -z "$dap_pane_exists" ]]; then
dap_pane_id=$(tmux split-window -d -l "20%" -P -F "#{pane_id}")
tmux set -g @dap_pane_id "$dap_pane_id"
tmux send-keys -t $dap_pane_id "export PROMPT_COMMAND= ; set +o history" ENTER
else
tmux send-keys -t $dap_pane_id C-c
tmux send-keys -t $dap_pane_id C-c
fi
tmux send-keys -t $dap_pane_id "$command" ENTER
```
### Debug adapter version
_No response_
### Steps to Reproduce
1. Use the above-mentioned configuration
2. Update nvim-dap to commit 6782b09
3. Start a debug session
### Expected Result
Nvim-Dap opens a Tmux split
### Actual Result
The following message can be seen:
`Could not launch terminal /home/ds/.tmux/tmux_dap_split.sh`
The debug session doesn't start properly.
3 条评论