GithubHelp home page GithubHelp logo

Supporting debug within Rails 7.0 about debug HOT 7 CLOSED

ruby avatar ruby commented on May 13, 2024
Supporting debug within Rails 7.0

from debug.

Comments (7)

ko1 avatar ko1 commented on May 13, 2024 1

To support filtering "step-in/over/out" more considerations are needed.

from debug.

pixeltrix avatar pixeltrix commented on May 13, 2024 1

Sorry I couldn't understand the question correctly. What do you want to do with the debugger?

Don't worry - I thought that binding.bp dropped you into an IRB console but that's not the case so it's another confusion on my part.

from debug.

ko1 avatar ko1 commented on May 13, 2024
  1. Maybe there is a confusion.
  • DEBUGGER__.console starts debugging under MRI. This means enables many debugger features such as entering debugger with Ctrl+C, thread/ractor tracing, eval code collection and so on.
  • binding.bp introduces explicit break point (the name is not fixed. binding.debug is one idea). Maybe your question is it.
  • I'm not sure what is debugger method, but I think breaking compatibility is not good, this is why I introduced binding.bp new name.
  1. Maybe you are talking about "step-in/out" features with filtering. It is possible. The problem is debug command design. If you have good idea (or you can summaries requirements), please make new issue about it. Now I don't have good knowledge to design this feature (simply skipping gem code?).

  2. Maybe we release 1.0.0 before 3.1. There is no plan so we can discuss about it.

Thanks.

from debug.

pixeltrix avatar pixeltrix commented on May 13, 2024
  1. Yes, that's confusion on my part - binding.bp or binding.debug are fine. Is there a way to jump back out to MRI to do things like control threads?

  2. As a first step, adding an explicit binding.debug and then being able to use step to skip over frames that are inside gem code would be good. We're pretty early in thinking about this so we'll need to give it some deeper thought.

  3. That's good to know - as I said we're not close to shipping but just wanted to clarify things.

Thanks for your prompt responses - I'll open a new issue about point 2 once we've given it some more thought around API and features, so I'll close this issue. 👍🏻

from debug.

st0012 avatar st0012 commented on May 13, 2024

Regarding the 2nd point, I think it can be achieved by injecting a callback at

@target_frames = DEBUGGER__.capture_frames __dir__

With something similar to

      @target_frames = DEBUGGER__.capture_frames __dir__
      @target_frames = @target_frames.select do |frame|
        frame.location_str.match?(Rails::BacktraceCleaner::APP_DIRS_PATTERN)
      end

This should exclude non-app frames from any later operations.

from debug.

ko1 avatar ko1 commented on May 13, 2024

@pixeltrix

Is there a way to jump back out to MRI to do things like control threads?

Sorry I couldn't understand the question correctly. What do you want to do with the debugger?

from debug.

st0012 avatar st0012 commented on May 13, 2024

@pixeltrix do you think the Rails example in #157 is similar what you're looking for?

from debug.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.