Skip to content

Instantly share code, notes, and snippets.

@griels
Created December 20, 2019 11:12
Show Gist options
  • Select an option

  • Save griels/5eab30667155ee2448f39676d353e5b9 to your computer and use it in GitHub Desktop.

Select an option

Save griels/5eab30667155ee2448f39676d353e5b9 to your computer and use it in GitHub Desktop.
# install section, need permissions/virtualenv activated
export PYCBC_DEBUG=TRUE
pip uninstall --yes couchbase
pip install couchbase
#run section
export LCB_LOGLEVEL=5
export TMPCMDS="debug_cmds"
export APP_LOCATION="/usr/share/.../my_app.py"
export APP_ARGS="misc args"
echo "trying to write to: ["
echo "${TMPCMDS}"
echo "]"
echo "run ${APP_LOCATION} ${APP_ARGS}" > "${TMPCMDS}"
echo "bt" >>"${TMPCMDS}"
echo "py-bt" >>"${TMPCMDS}"
echo "quit" >>"${TMPCMDS}"
gdb -batch -x "${TMPCMDS}" `which python`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment