Skip to content
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

it fails to stop on breakpoints on module methods #122

Closed
x-yuri opened this issue Feb 13, 2015 · 1 comment
Closed

it fails to stop on breakpoints on module methods #122

x-yuri opened this issue Feb 13, 2015 · 1 comment

Comments

@x-yuri
Copy link

x-yuri commented Feb 13, 2015

It certainly reminds me the earlier issue, but this doesn't seem to be fixed as opposed to the one at the link.

Gemfile:

source "https://rubygems.org"
ruby '2.1.5'
gem 'sentry-raven', '0.12.3'
gem 'byebug', github: 'deivid-rodriguez/byebug', branch: 'dd5d48c'   # current master

1.rb:

require 'rubygems'
require 'bundler/setup'

require 'sentry-raven'
require 'byebug'

Raven.configure(true) do |config|
  config.dsn = '...'
end

Raven.capture do
byebug
  putss 'test'
end

ruby 1.rb:


[5, 14] in 1.rb
    5: require 'byebug'
    6: 
    7: Raven.configure(true) do |config|
    8:   config.dsn = '...'
    9: end
   10: 
   11: Raven.capture do
   12: byebug
=> 13:   putss 'test'
   14: end
(byebug) break Raven::Client#send
Successfully created breakpoint with id 1
(byebug) c
Stopped by breakpoint 1 at Raven::Client:send

[20, 29] in /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/client.rb
   20:       @configuration = configuration
   21:       @processors = configuration.processors.map { |v| v.new(self) }
   22:       @state = ClientState.new
   23:     end
   24: 
=> 25:     def send(event)
   26:       unless configuration.send_in_current_environment?
   27:         configuration.log_excluded_environment_message
   28:         return
   29:       end

ruby 1.rb:


[5, 14] in 1.rb
    5: require 'byebug'
    6: 
    7: Raven.configure(true) do |config|
    8:   config.dsn = '...'
    9: end
   10: 
   11: Raven.capture do
   12: byebug
=> 13:   putss 'test'
   14: end
(byebug) break Raven.send
Successfully created breakpoint with id 1
(byebug) c
D, [2015-02-13T15:37:31.852087 #22722] DEBUG -- : ** [Raven] Sending event d5efe4c620f3a00492bb955b89d83641 to Sentry
E, [2015-02-13T15:37:31.914420 #22722] ERROR -- : ** [Raven] Unable to record event with remote Sentry server (Raven::Error - Unknown transport scheme '')
E, [2015-02-13T15:37:31.914703 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/client.rb:89:in `transport'
E, [2015-02-13T15:37:31.914914 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/client.rb:43:in `send'
E, [2015-02-13T15:37:31.915108 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:76:in `send'
E, [2015-02-13T15:37:31.915300 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:114:in `block in capture_exception'
E, [2015-02-13T15:37:31.915481 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:141:in `send_or_skip'
E, [2015-02-13T15:37:31.915672 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:108:in `capture_exception'
E, [2015-02-13T15:37:31.915863 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:93:in `rescue in capture'
E, [2015-02-13T15:37:31.916052 #22722] ERROR -- : ** [Raven] /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:88:in `capture'
E, [2015-02-13T15:37:31.916233 #22722] ERROR -- : ** [Raven] 1.rb:11:in `<main>'
E, [2015-02-13T15:37:31.916526 #22722] ERROR -- : ** [Raven] Failed to submit event: NoMethodError: undefined method `putss' for main:Object
1.rb:13:in `block in <main>': undefined method `putss' for main:Object (NoMethodError)
        from /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:89:in `call'
        from /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:89:in `capture'
        from 1.rb:11:in `<main>'

ruby 1.rb:


[5, 14] in 1.rb
    5: require 'byebug'
    6: 
    7: Raven.configure(true) do |config|
    8:   config.dsn = '...'
    9: end
   10: 
   11: Raven.capture do
   12: byebug
=> 13:   putss 'test'
   14: end
(byebug) break /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:76
Successfully created breakpoint with id 1
(byebug) c
Stopped by breakpoint 1 at /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb:76

[71, 80] in /home/yuri/.gem/ruby/2.1.5/gems/sentry-raven-0.12.3/lib/raven/base.rb
   71:     #
   72:     # @example
   73:     #   evt = Raven::Event.new(:message => "An error")
   74:     #   Raven.send(evt)
   75:     def send(evt)
=> 76:       client.send(evt)
   77:     end
   78: 
   79:     # Capture and process any exceptions from the given block, or globally if
   80:     # no block is given
@deivid-rodriguez
Copy link
Owner

Yep @x-yuri, you're right. Do you want to submit a PR?

@x-yuri x-yuri changed the title it fails to stop on breakpoints on class methods it fails to stop on breakpoints on module methods Feb 24, 2015
deivid-rodriguez pushed a commit that referenced this issue Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants