diff --git a/drush b/drush
index 0e0de2363c..dc874bf82d 100755
--- a/drush
+++ b/drush
@@ -16,7 +16,7 @@ parse_commandline()
 		_key="$1"
 		case "$_key" in
 			--xdebug)
-				DRUSH_ALLOW_XDEBUG=1
+				export DRUSH_ALLOW_XDEBUG=1
 				return
 				;;
 		esac