我想我可以通过将$^D
设置为1<<<<<<<<<<<<<<<<<<<<<<<<<
When the execution of your program reaches a point that can hold a breakpoint,the
DB::DB()
subroutine is called if any of the variables$DB::trace
,$DB::single
,or$DB::signal
is true. These variables are not localizable. This feature is disabled when executing insideDB::DB()
,including functions called from it unless$^D & (1<<30)
is true.When execution of the program reaches a subroutine call,a call to
&DB::sub (args)
is made instead,with$DB::sub
holding the name of the called subroutine. (This doesn’t happen if the subroutine was compiled in the DB package.)
(重点补充)
IRC#perl-help频道的人说用$^ D& (1<<<<<<<<<<<<<<<<<<<<<<<<<<< 30) 如何逐步跟踪DB :: DB()和DB :: sub()子例程的执行情况? UPD
根据下面的答案.当设置$^ D | =(1<<<< 30)标志时,这允许我调试在DB命名空间之外定义的调试器命令,但这不是问题的答案:如何在执行DB ::内部时禁用该功能D B?
解决方法
当我从调试器运行这个表达式时,$^ D | =(1<<<<<<<<<<<<<<<<<<<<<<<<<<<<
This feature is disabled when executing inside DB::DB(),including functions called from it unless
$^D & (1<<30)
is true
来自DOC的这句话只会令人困惑.在DB :: DB()内部执行时,该功能未被禁用,除非$^ D& (1 << <30)是真的.当$^ D& amp;& ;; (1 << <30)是真的