Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugging all callers of a function? #13

Open
jackfirth opened this issue Jul 21, 2017 · 2 comments
Open

Debugging all callers of a function? #13

jackfirth opened this issue Jul 21, 2017 · 2 comments
Assignees

Comments

@jackfirth
Copy link

Sometimes I don't want to debug an expression, I want to debug all calls to a particular function. Would that belong in this package or a different library?

I'm imagining something like define/debug that works just like define but acts as if all callsites are wrapped in #R.

@AlexKnauth
Copy link
Owner

That would fit fine in this package. Although it won't be able to print out the expression of the callsite like #R would, and I'm not sure how a user would find which call it came from... If we do this, should define/debug define a function-like macro (sort of like rackunit does) so that it can save the source location and the expression?

@jackfirth
Copy link
Author

I think a function-like macro like rackunit checks is a fine idea. Here's an idea for naming:

  • (define#R (foo arg ...) body ...) Records callsite information in the same way as wrapping callsites with #R
  • (define#RR (foo arg ...) body ...) Callsites recorded with #RR
  • (define#RRR (foo arg ...) body ...) Callsites recorded with #RRR

define/debug seems too long to type.

@AlexKnauth AlexKnauth self-assigned this Nov 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants