Skip to content

Commit

Permalink
WIP - try module ignores (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky authored Sep 15, 2024
1 parent 75f6677 commit 14ad5d1
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions trepan/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
from typing import Any, Callable

import pyficache

# External Egg packages
import tracer

from tracer.tracefilter import TraceFilter

from trepan.exception import DebuggerQuit, DebuggerRestart
Expand Down Expand Up @@ -343,11 +340,15 @@ def restart_argv(self):
# DEFAULT_INIT_OPTS which includes references to these.

# Note: has to come after functions listed in ignore_filter.
ignore_items = [tracer.tracer, TrepanCore]
trepan_debugger = sys.modules.get("trepan.debugger")
if trepan_debugger is not None:
ignore_items.append(trepan_debugger)
else:
ignore_items += [run_call, run_eval, run_script]
DEFAULT_INIT_OPTS = {
# What routines will we not trace into?
"ignore_filter": TraceFilter(
[tracer.start, tracer.stop, run_eval, run_call, run_eval, run_script]
),
"ignore_filter": TraceFilter(ignore_items),
# sys.argv when not None contains sys.argv *before* debugger
# command processing. So sys.argv contains debugger options as
# well as debugged-program options. These options are used to
Expand Down

0 comments on commit 14ad5d1

Please sign in to comment.