Skip to content

Commit

Permalink
chore: add ftlDebug script (#2742)
Browse files Browse the repository at this point in the history
This makes it easy to run FTL under dlv, and dlv will wait for the IDE
to attach. This is useful if you want to debug commands other than ftl
dev
  • Loading branch information
stuartwdouglas authored Sep 25, 2024
1 parent 731e56a commit 61ccd16
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions scripts/ftlDebug
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
# Note that this does not seem to work in intellij, as it can't handle dlv without --continue
# VS Code works great though
set -euo pipefail
ftldir="$(dirname "$(readlink -f "$0")")/.."
name="ftl"
dest="${ftldir}/build/devel"
src="./cmd/${name}"
if [ "${name}" = "ftl" ]; then
src="./frontend/cli"
fi
mkdir -p "$dest"
(cd "${ftldir}/${src}" && dlv debug --headless --listen=:2345 --api-version=2 --log --accept-multiclient -- "$@" )

0 comments on commit 61ccd16

Please sign in to comment.