--- a/AppRun
+++ b/AppRun
@@ -31,7 +31,11 @@
     shift
 fi
 if [ "x$1" = "x--debug" ] ; then
-    export G_SLICE=all
+    debug="gdb --args"
+    shift
+fi
+if [ "x$1" = "x--valgrind" ] ; then
+    export G_SLICE=always-malloc
     debug="valgrind"
     ulimit -c unlimited
     shift