hpi-swa-lab / squeak-tracedebugger

A lightweight and interactive back-in-time debugger for Squeak to trace and retrace past method invocations and state changes. Powered by SimulationStudio.
https://hpi-swa-lab.github.io/squeak-tracedebugger/
MIT License
6 stars 0 forks source link

Better filter mechanisms ("through filters") #73

Open LinqLover opened 2 years ago

LinqLover commented 2 years ago

While #19 has already been closed by #47, the convenience of the current filter mechanism is still very limited. In short, in some situations, users might want to hide only specific contexts, whereas, in other situations, they would want to hide all their callees, too. The current approach only supports the first use case.

Reconsidering different scenarios for filters:

With the exception of the last (so far mainly fictive) scenario, a better filter mechanism would cut away contexts from the stack from the first filtered-away context (e.g., Morph>>#allMorphsDo:) up to (exclusively) the first block context whose home context was called outside of the filter. In other words, the filters should only be applied to the method context of stackframes ("through filters"). See Context>>#cut: for a comparable mechanism.

However, there is another (still much more elaborated) limitation of this approach: If the "evaluable" passed into e.g. a composite send is not a block, the focus on home contexts from above is too specific. E.g., for (1 to: 10) sorted: #asWords ascending or (aTdbTrace childrenForFilter: aTdbContextFilter), the filters would also hide Integer>>#asWords or TDBContextFilter>>#value:. To encounter this problem, some kind of tracking mechanism to determine the origin of an object would be required (see https://github.com/LinqLover/squeak-tracedebugger/issues/74).

LinqLover commented 2 years ago

Another feature request regarding filters would be "hide all packages but package X".

LinqLover commented 2 years ago

Todo: Also think about allow-list instead of disallow-list filters (cf. #56)?