Debugging Python UPoC
Python UPoC debugging is supported only from the command line, not with NetBeans.
- In the shell of a terminal, run setroot, then setsite to the JavaScript/Python demo site.
-
To debug Jython TPS, in the hcitpstest command line, add
{DEBUG 1}
to enable debugging:$ hcitpstest -r run -x ASCII -f nl -c sms_ib_data -e "hcitpstestshowbydisp" $HCISITEDIR/in.txt "cljTPS {CLASS ScriptTPS} {LANG python} {FILE per.py} {FUNC tpsFunc}" The simpleUPoC module is imported > /work/quovadx_dev/qdx6.2P/integrator/jsjy/pythonmodules/simpleUPoC.py(17)run() -> '@type msg: Message' (Pdb)
At this point, you can use various commands to do debugging. Specify “h
” for help. See the online pdb - The Python Debugger document for reference. -
In Emacs (Version 24.3.1 on CentOS 7.1), add these lines to the
~/.emacs file:
(require 'python) (add-hook 'comint-output-filter-functions 'python-pdbtrack-comint-output-filter-function)
-
Start Emacs, then run the hcitpstest command in any comint-based buffers. For example,
*shell*
. Thepdbtrack
hook acknowledges thepdb
prompt and presents the line in the source file where the program is stopped in a pop-up buffer.