Giter Site home page Giter Site logo

Comments (5)

os97673 avatar os97673 commented on August 10, 2024

I was unable to reproduce the problem :( Could you please run debugger in verbose mode and provide debugger's output.

from ruby-debug-ide.

BertramW avatar BertramW commented on August 10, 2024

Please can you write exactly what I should do because I'm not familiar with the debugger. I use it only within die IDE.

from ruby-debug-ide.

os97673 avatar os97673 commented on August 10, 2024

In RubyMine go to Settings|Debugger|Ruby and enable debugger's verbose output.

from ruby-debug-ide.

BertramW avatar BertramW commented on August 10, 2024

What I have done:

first variant: Using the name 'print_array' in the script.

1: I've started debugging the script. It stopped at the first breakpoint and the variable names appeared in the variables view.
2: I opened the array 'sample_ary' in the variables view to see the content of the array element. Now the script RESUMED IMMEDIATELY and stopped at the second breakpoint. The variables view showed 'collecting data' as described in the first message. After some seconds the variable names appeared in the variables view.
3: same as 2

verbose debug output:


/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/walter/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide --debug --disable-int-handler --port 56333 --dispatcher-port 46852 -- /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base19x 0.11.30.pre15) listens on 127.0.0.1:56333
Connected from 127.0.0.1
29147: Starting control thread
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22
29147: <breakpointAdded no="1" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22"/>
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21
29147: <breakpointAdded no="2" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21"/>
29147: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20
29147: <breakpointAdded no="3" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20"/>
29147: Processing in control: start
29147: Starting: running program script
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="20" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context:  w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='20' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 1
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v i +0x14c8ab4
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="21" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context:  w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 2
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v i +0x14c8ab4
29147: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="22" threadId="1"/>
29147: Stopping Thread #<Thread:0x000000024860f0> (29147)
29147: Threads equal: true
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in control: th l
29147: <threads>
29147: <thread id="1" status="sleep" pid="29147" />
29147: </threads>
29147: Processing in context: th in 1
29147: Processing in context:  w
29147: <frames>
29147: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' current='true' />
29147: </frames>
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v l
29147: <variables>
29147: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x14c8ab4"/>
29147: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x14c8a8c"/>
29147: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x14c8aa0"/>
29147: </variables>
Breakpoint 3
29147: Processing in context: th in 1
29147: Processing in context:  frame 1
29147: Selected frame no 0
29147: Processing in context:  v i +0x14c8ab4

Process finished with exit code 0

second variant: Using the name 'print_array_' in the script, which causes the debugging to run as I expected.

1: I've started debugging the script. It stopped at the first breakpoint and the variable names appeared in the variables view.
2: I opened the array 'sample_ary' in the variables view to see the content of the array element. Now elements appeared in the variables view. Stepping over (F8), the script resumed and stopped at the second breakpoint.
3: same as 2

verbose debug output:


/usr/bin/ruby -e at_exit{sleep(1)};$stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /home/walter/.gem/ruby/1.9.1/gems/ruby-debug-ide-0.4.23.beta1/bin/rdebug-ide --debug --disable-int-handler --port 34565 --dispatcher-port 46559 -- /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb
Fast Debugger (ruby-debug-ide 0.4.23.beta1, ruby-debug-base19x 0.11.30.pre15) listens on 127.0.0.1:34565
Connected from 127.0.0.1
29195: Starting control thread
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22
29195: <breakpointAdded no="1" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:22"/>
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21
29195: <breakpointAdded no="2" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:21"/>
29195: Processing in control: b /home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20
29195: <breakpointAdded no="3" location="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb:20"/>
29195: Processing in control: start
29195: Starting: running program script
29195: <breakpoint file="/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb" line="20" threadId="1"/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context:  w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='20' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 1
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context:  w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='21' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 2
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context:  w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/print.rb' line='22' current='true' />
29195: </frames>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v l
29195: <variables>
29195: <variable name="sample_ary" kind="local" value="Array (2 element(s))" type="Array" hasChildren="true" objectId="+0x12c099c"/>
29195: <variable name="sample_hsh" kind="local" value="Hash (2 element(s))" type="Hash" hasChildren="true" objectId="+0x12c0974"/>
29195: <variable name="sample_str" kind="local" value="sample string" type="String" hasChildren="true" objectId="+0x12c0988"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  v i +0x12c099c
29195: <variables>
29195: <variable name="[0]" kind="instance" value="1" type="Fixnum" hasChildren="false" objectId="+0x3"/>
29195: <variable name="[1]" kind="instance" value="2" type="Fixnum" hasChildren="false" objectId="+0x5"/>
29195: </variables>
29195: Processing in context: th in 1
29195: Processing in context:  frame 1
29195: Selected frame no 0
29195: Processing in context:  next
29195: Resumed Thread #<Thread:0x000000020760f0>
29195: <suspended file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/-e' line='1' threadId='1' frames='1'/>
29195: Stopping Thread #<Thread:0x000000020760f0> (29195)
29195: Threads equal: true
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
Breakpoint 3
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in control: th l
29195: <threads>
29195: <thread id="1" status="sleep" pid="29195" />
29195: </threads>
29195: Processing in context: th in 1
29195: Processing in context:  w
29195: <frames>
29195: <frame no='1' file='/home/walter/Documents/AptanaStudio3Workspace/debugtest/-e' line='1' current='true' />
29195: </frames>

from ruby-debug-ide.

os97673 avatar os97673 commented on August 10, 2024

Ok, so the problematic code is https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/commands/variables.rb#L82-L88 These lines are supposed to call methods declared in https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/xml_printer.rb and this is done by some Ruby meta/magic programming (https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/command.rb#L78-L84)
And it looks like the magic doesn't work correctly :(
The simple fix is to call all these methods on self, but it would be better to figure out what is wrong with current approach and fix it (if you know what the problem is PR is welcome ;)

from ruby-debug-ide.

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.