-
Notifications
You must be signed in to change notification settings - Fork 130
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
Stepping into a specific call on a line #655
Comments
Debugger supports breaking at an object's method call with the |
@st0012 that's a really good workaround that I hadn't considered. Thank you! The biggest issue I see is that it leaves lingering breakpoints that can be hit later, from what was intended to be a transient As an aside, the first scenario I ran into where I could use it was this, where I wanted to step into result = described_class.new(operations).import In this case, I couldn't Regardless, thank you—this is useful in the meantime! |
Alternatively, if we could create one-time breakpoints, this might be less effort to implement and still eliminate the biggest drawback to this workaround. |
We do support one-time breakpoints internally but it's not exposed to commands yet. But I think it's worth considering for the cases you mentioned. |
I think one-time breakpoint doesn't solve this issue because if the breakpoint is not reached (because of exception and so on) it will be remained. Extending # c.rb
class C
def foo
end
end I think pattern should be
and combination? or only method name? Note that regexp pattern should be use |
I like the idea of extending
That'll give users enough options to navigate complicated method calls like # step Template#format
# step Diestor.diest
# step template.virtual_path
digest = Digestor.digest(name: template.virtual_path, format: template.format, finder: lookup_context, dependencies: view_cache_dependencies) |
maybe this feature can be decomposed into the following features
|
English question: |
Step XXX maxes sense. “Into” can be implied.
|
`step into <name>` stops at the beggining of the method `<name>`. `into` is added because there are alreay `step back` and `step reset` commands. fix #655
I choose |
Problem Description
It can be extremely tedious (and even hard to know how) to step into the intended method call on a line that has many method calls. Consider this sample code with 9 method/variable references:
If my goal is to step into the
hset
call, I must firststep
into,finish
, andstep
/next
into the next call for up to 8 other method calls before I can step intohset
. It's extremely easy to get lost during this process, especially in unfamiliar code and when it's unclear which references are to methods and which are to local variables.Ideas
I'm interested in your feedback about what would be feasible. Here are some ideas:
step <method_name>
: step into methodmethod_name
, with partial name match supported. (implementation) If given a numeric argument,step
would continue to step n times. If given a string argument, it would attempt to match step into the method where__callee__
matches the given pattern.?
, i.e.step ?
.Are any of these feasible? What are your thoughts? Thanks for considering!
The text was updated successfully, but these errors were encountered: