From 08fc72f8e380bbb571ff3036aba37bac59d0b033 Mon Sep 17 00:00:00 2001 From: Thorsten Scherer Date: Wed, 4 May 2022 16:09:47 +0200 Subject: [PATCH] vscode: remote-debug: Preventively kill gdbserver An existing gdbserver process prevents the vscode debug session. So kill all running gdbserver beforehand. --- vscode/templates/default/remote-debug.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/vscode/templates/default/remote-debug.sh b/vscode/templates/default/remote-debug.sh index 3c0af9b..72a6ac8 100755 --- a/vscode/templates/default/remote-debug.sh +++ b/vscode/templates/default/remote-debug.sh @@ -11,6 +11,7 @@ cp -v "${1}" "${NFS_TARGET_PATH}" ssh -L"${GDBSERVER_TARGET_PORT}:localhost:${GDBSERVER_TARGET_PORT}" "${GDBSERVER_USER_REMOTE}@${GDBSERVER_TARGET_HOST}" << EOF cd "${GDBSERVER_PATH_REMOTE}" +killall gdbserver 2>/dev/null export LD_LIBRARY_PATH="${GDBSERVER_PATH_REMOTE}" gdbserver --once :"${GDBSERVER_TARGET_PORT}" "${GDBSERVER_EXECUTABLE}" EOF