擅长:python、mysql、java
<p>我以前经常遇到这个问题。现在,作为签入过程的一部分,我运行查找调试语句的find/grep脚本组合框。唯一需要注意的是,我必须保持添加的调试语句的一致性,这样grep才能找到它们。在</p>
<p>像这样:</p>
<pre><code>## pre-checkin_scan.bin
find . -name "*.py" -exec grep -H --file=/homes/js/bin/pre-checkin_scan_regexp_list.grep {} \;
## pre-checkin_scan_regexp_list.grep
## (The first pattern is to ignore Doxygen comments)
^##[^@]
pdb
^ *print *( *" *Dbg
^ *print *( *" *Debug
^ *debug
</code></pre>