...
Par la suite vous pouvez lancer le debugage via la barre supérieur :
Debugguer avec emacs
Sinon on peut utiliser la commande jdb
de emacs. Voici un script qui aide bien pour démarrer jdb
:
Bloc de code | ||||
---|---|---|---|---|
| ||||
#!/bin/sh
attach=$1
sourcepath=$2
initial_breakpoint=$3
usage() {
echo "usage example: jdbc-emacs localhost:5555 src/main/java org.esupportail.portal.services.ProlongationENT.doGet"
exit 1
}
[ $# = 3 -o $# = 2 ] || usage
[ -d "$sourcepath" ] || { echo "$sourcepath does not exist"; usage; }
cmd="(jdb \"jdb -attach $attach -sourcepath$sourcepath\")"
if [ -n "$initial_breakpoint" ]; then
cmd2="(gud-call \"stop in $initial_breakpoint\")"
cmd="(progn $cmd $cmd2)"
fi
exec emacs --eval "$cmd" |