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

Continue debugging when instrumented functions finishes executing and continue debugging caller #516

Open
AhmedAzzabi opened this issue Mar 21, 2018 · 5 comments
Assignees
Labels

Comments

@AhmedAzzabi
Copy link

In cider for the debugger, if we have 2 functions func1 that calls func2 and only func2 is instrumented with #dbg, when evaluating func1 the debugger stops in func2 which is good, but after doing next and finishing all func2 is there a way to continue debugging the caller func1 even if it is not instrumented, currently it just finish the evaluation. I think when debugging it will be good to not have to manually instrument func1 or all the call hieararchy to continue debugging, i whish that as long as im doing next it just continue debugging step by step and when func2 finishes it steps out and continue debugging.

Thanks

@Malabarba
Copy link
Member

No, there's no way to do that right now.
Unfortunately, due to how the debugger is implemented, such a feature would also be quite difficult to implement.

@AhmedAzzabi
Copy link
Author

That's what i thought too, then is there a way to instrument all the project in one command or one shot ? also im wondering if during debug i instrument the calling func1, will it take effect in current debug session running ? i tried but looks not working, i thought maybe while we are in func2 we can always from stacktrace find the caller func1 and add #dbg so we can debug it, but my first try it looks it is not working

@vspinu
Copy link
Contributor

vspinu commented Oct 15, 2018

also im wondering if during debug i instrument the calling func1, will it take effect in current debug session running ?

I think this is the right way to fix this issue.

@vspinu vspinu self-assigned this Oct 15, 2018
@AhmedAzzabi
Copy link
Author

Yes i think if we have the ability to add breakpoint while debug session is running we can solve this issue without much effort, we have stack trace and we can instrument calling functions, also it is a good feature to have anyway sometimes when im debugging i want to add more breakpoints but they are not taken in consideration and have to restart debug session in order for new breakpoints to take effect

@vspinu
Copy link
Contributor

vspinu commented Oct 23, 2018

None of these is easy with the current implementation of the debugger. But if clojure-emacs/cider#2005 could be implemented it would essentially come for free. I have some ideas of how to debugg without hijacking the eval op but that would require a major rewrite of the debugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants