How to debug in run script


Answer:use echo!


echo "warning: 開始log"
filePath="$(pwd)"
echo "warning: CURRENT_DIR= $filePath"
echo "warning: PROJECT_DIR= $PROJECT_DIR"
echo "warning: PROJECT_NAME= $PROJECT_NAME"
echo "error: meh"
就會出現這些warning

沒有留言: