-
-
Notifications
You must be signed in to change notification settings - Fork 645
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
start cider debug session by a http request ? #1170
Comments
Thanks for filing this. Could you detail how that web deve workflow is setup? I'm not familiar with it. |
I'm guess the question can be rephrased like this - "How can you debug a function that you don't invoke directly in CIDER?" (in this case the browser would invoke the function as the result of some callback). I think there's something special that needs to be done, as long as you've connected to a process in which the function in question has been instrumented. |
as @bbatsov said
give a similar example, use geben to debug PHP function
|
@Malabarba Did you check if this is working on not? If not, I guess you need just a simple |
@bbatsov
I could be wrong here, but the way the debugger is designed it should always trigger when the function is executed, no matter how that happens. Although there are a couple aspects of it which might not work without an eval message, the breakpoints should still trigger. This tells me that either (a) the function is not getting instrumented properly, or (b) the system in question support something we do (which is a pretty wide umbrella). |
@WeweTom Just to be sure, this is Clojure, right? Not ClojureScript? |
Closing due to lack of recent activity. |
FWIW, it's probably fixed. I've been using clojure for webdev and I made a fix to the debugger for it. |
Sorry for my late reply. I want to debug |
@WeweTom I'm on the same version as you. Did you ensure that the cider-nrepl version is also the snapshot? In my webdev workflow, I used What was your workflow like? |
@Malabarba |
@WeweTom That's your cloure.tools.nrepl version. What do you get if you evaluate |
@Malabarba wow , after change ~/.lein/profiles.clj
|
after play with it for just a few minute , I find a problem . I begin a debug session A, after that , I refresh url in browser , Session A is destroyed , and begin a new session . so , can you change this behavior : when there is an active session , new sessions are ignored . or it would be great to add a debug flag in http request . only http request with certain flag , debug session will be invoked. just like PHP geben debug tool I priviously posted , geben has a chrome plugin to add a http header thanks for your great work. |
Relying on a flag wouldn’t make a lot of sense right now. The debugger is purely expression based, and has no knowledge of the environment in which it's being run. Still, I'd like to handle better the situation of overlapping sessions, so I'll look into that. |
@Malabarba this fix alone is worth a release IMHO. The debugger is useless for web development (at least for me) in 0.9.1. |
@NicolasPetton Hang tight. 0.10 is really close now. :-) |
Is it? :-) On Friday, 30 October 2015, Artur Malabarba notifications@github.com
Best Regards, |
Well, the date on the milestone is close. Whether we'll meet that is another matter. :-) |
I'm using CIDER 0.11.0 and the debugger does indeed trigger on an http request as expected. However, the eval feature is broken for me. I'm going to poke around at it for an hour or two to see whats going on but I figured I would chime in here first. I notice that upon entering an instrumented function that the current namespace |
The error happens whenever I confirm an expression by pressing RET. Heres the stack trace:
|
Ok, this is probably because we try to restore the namespace after evaluating. I'll try to look into a proper solution later, but for now I'll patch this with a |
the new 0.9.x debug feature is cool !
M-x
cider-debug-defun-at-point
, eval a function in a emacs buffer, then a debug session startedbut in a web dev workflow , a function is invoked by a http request , I enter a url in the browser and a handler then excuted , so my question is : is there a way to debug handler function in this kind of situation?
The text was updated successfully, but these errors were encountered: