diff --git a/bin/compile b/bin/compile
index 0ac6d0d4ffc7439633fc7e39efe8c393fad3a7ef..4553b44f3addfa4034b418f5d05da8e65e89cb5c 100755
--- a/bin/compile
+++ b/bin/compile
@@ -7,6 +7,8 @@
 # Fail fast and fail hard.
 set -eo pipefail
 
+[ "$BUILDPACK_XTRACE" ] && set -o xtrace
+
 # Prepend proper path for virtualenv hackery. This will be deprecated soon.
 export PATH=:/usr/local/bin:$PATH