Giter Site home page Giter Site logo

Comments (6)

rockorequin avatar rockorequin commented on August 10, 2024

More concisely, what happens with ruby-2.0/debase-0.0.3 is that every time the thread hits a breakpoint and suspends, debase reports back first 'suspend' then 'breakpoint' for the same line. Whereas ruby-1.9/ruby-debug-base19x always reports exactly one event: if the thread was running and it hits a breakpoint, it reports only 'breakpoint'; if the thread was being stepped and the step finishes, it reports 'suspend'.

This confuses the Netbeans plugin because it only ever expects only one event when the thread suspends - it treats the 'breakpoint' and 'suspend' events exactly the same. So it ends up locking a semaphore twice for essentially what is the same event, and when the user issues a command to step or continue, it only releases the semaphore once and subsequently freezes.

from debase.

rockorequin avatar rockorequin commented on August 10, 2024

If I comment out this line in debase's ext/debase_internals.c#process_line_event function:

    rb_funcall(context_object, idAtBreakpoint, 1, breakpoint); 

the ruby-netbeans plugin runs without problem.

This makes debase only send suspend events, ie it never sends breakpoint events, so it doesn't exactly mimic the behaviour of ruby-debug-base19x. So the question still is, should debase mimic ruby-debug-base19x's behaviour? Modifying the ruby-netbeans plugin to handle the current debase-0.0.3 behaviour is a bit complex unless we change it to just ignore all breakpoint events from any version of ruby greater than 1.9.

from debase.

denofevil avatar denofevil commented on August 10, 2024

Yes, it looks like behaviour is slightly different compared with ruby-debug-base19x. I'll test version with commented breakpoint event on RubyMine and will upload it if everything is ok

from debase.

rockorequin avatar rockorequin commented on August 10, 2024

How did it go in RubyMine?

from debase.

denofevil avatar denofevil commented on August 10, 2024

The real problem was in debase not setting correct stop reason when hitting breakpoint. You can try debase-0.0.4, it should work ok now.

from debase.

rockorequin avatar rockorequin commented on August 10, 2024

Thanks, debase-0.0.4 does work now in Netbeans.

from debase.

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.