标签: ruby-debug

ruby-debug和黄瓜

我有一个黄瓜失败的情况,我想使用ruby-debug调试我的rails控制器.但是,如果我将"调试器"添加到我想要破解的位置,它就不会停止.

我尝试将features of ruby​​-debug和rubygems添加到features/support/env.rb但是然后它告诉我它无法加载ruby-debug,尽管ruby-debug在gem列表中我可以加载它IRB.

那么......我该怎么办才能让它发挥作用?

谢谢!

ruby-on-rails cucumber ruby-debug

8
推荐指数
2
解决办法
3863
查看次数

精简SSL支持和ruby-debug

有没有人知道使用Thin同时运行ruby调试器和SSL的方法?

我一直在使用Rails 3.0.10成功使用Thin.

我开始使用它rails server --debugger,我可以调试我的代码.

最近,我还需要为我的应用程序添加SSL支持,并且我希望能够使用自签名证书在本地测试它.

不幸的是,我还没有找到一种在使用时启动Thin with SSL支持的方法rails server.

我可以使用以下方法成功启动Thin with SSL支持:

thin start --ssl --ssl-verify --ssl-key-file ssllocal/server.key
    --ssl-cert-file ssllocal/server.crt
Run Code Online (Sandbox Code Playgroud)

但是,我还没有找到一种方法来激活调试器thin start.

所以我似乎可以选择运行debugger(rails server)或SSL(thin start),但不能同时运行.

似乎可以rails server通过修改rails/script文件让Webrick运行SSL (参见这里).我尝试了这种方法,但我没有成功.这是其中一个尝试:

#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3
# gems installed from the root of your application.

APP_PATH = File.expand_path('../../config/application',  __FILE__)
require File.expand_path('../../config/boot',  __FILE__)


# THIS IS NEW: …
Run Code Online (Sandbox Code Playgroud)

ssl ruby-on-rails thin ruby-debug

7
推荐指数
1
解决办法
9524
查看次数

在Ruby 1.9.3中在Windows上安装ruby-debug-base19

当我执行时,我需要安装ruby-debug-base19以便在Netbeans IDE上激活调试:

$ gem install ruby-debug-base19
Run Code Online (Sandbox Code Playgroud)

我收到以下错误.从日志生成中提取

C:/Ruby193/bin/ruby.exe extconf.rb
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... no
C:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
checking for rb_method_entry_t.body in method.h... no
checking for vm_core.h... yes
checking for iseq.h... yes
checking for insns.inc... yes
checking for insns_info.inc... yes
checking for eval_intern.h... yes
creating Makefile

make
generating ruby_debug-i386-mingw32.def
compiling breakpoint.c
compiling ruby_debug.c
ruby_debug.c:24:19: error: conflicting types for 'rb_iseq_compile_with_option'
C:/Ruby193/include/ruby-1.9.1/ruby-1.9.3-p125/vm_core.h:505:7: note: previous declaration of 'rb_iseq_compile_with_option' was here
ruby_debug.c: In function …
Run Code Online (Sandbox Code Playgroud)

windows ruby-debug ruby-1.9.3

7
推荐指数
1
解决办法
3676
查看次数

Ruby调试正在步入而不是跨越

我在Ruby 2中编写了一个Rails 4应用程序,我正在使用debuggergem来调试我的代码.

目前的情况如下:

debugger在我的Rspec测试中放置一个语句,在shell中运行测试,程序按预期中断.我想进入下一行,n但是调试器实际上会进入代码,向我展示我不想看到的库的内部工作原理.

所以问题是,调试器命令n的作用就像s.

我怎么解决这个问题*?

*我不愿意在下一行放置一个断点然后continue,这将变得非常老,非常快.

ruby debugging ruby-on-rails ruby-debug

7
推荐指数
1
解决办法
1261
查看次数

Aptana 3 ruby​​调试器 - DebugThread循环中的异常:未定义的方法`is_binary_data?'

我正在尝试在Aptana 3中调试简单的ruby文件.

class HelloWorld

def initialize()

end

def greet()
  puts "hello world"
end
end

h=HelloWorld.new
h.greet
Run Code Online (Sandbox Code Playgroud)

断点设置为

h.greet
Run Code Online (Sandbox Code Playgroud)

在我开始调试之后,调试器启动,但是当它尝试初始化ruby类时,调试器与消息断开连接

Fast Debugger (ruby-debug-ide 0.4.9) listens on :54749
Exception in DebugThread loop: undefined method `is_binary_data?' for "#<HelloWorld:0x85915fc>":String  
Run Code Online (Sandbox Code Playgroud)

当我设置断点时

h=HelloWorld.new
Run Code Online (Sandbox Code Playgroud)

调试器启动,但在我进入initialize()构造函数后,它与先前的消息断开连接

我的宝石列表:

*** LOCAL GEMS ***

archive-tar-minitar (0.5.2)
bigdecimal (1.1.0)
columnize (0.3.6)
io-console (0.3)
json (1.5.4)
linecache19 (0.5.13)
minitest (2.5.1)
rake (0.9.2.2)
rdoc (3.9.4)
ruby-debug-base19 (0.11.26)
ruby-debug-ide19 (0.4.12)
ruby-debug19 (0.11.6)
ruby_core_source (0.1.5)
Run Code Online (Sandbox Code Playgroud)

我已成功应用这些指令,以解决调试问题,但我仍然收到此异常消息

任何答案都是受欢迎的,这可以解决这个问题.

谢谢.

ruby ruby-debug aptana3

6
推荐指数
1
解决办法
3372
查看次数

在Heroku上运行ruby-debug

有什么办法吗?我经常遇到本地工作的问题,但由于某些与环境有关的原因而无法在Heroku上运行.能够在那里运行调试器会很高兴.

debugging ruby-on-rails heroku ruby-debug

5
推荐指数
1
解决办法
1379
查看次数

错误:安装ruby-debug-ide

事实上,我是ruby on rails开发的新手.并不是说我无法在aptana studio 3上安装gem install ruby​​-debug-ide.

gem install ruby-debug-ide  
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
ERROR:  Error installing ruby-debug-ide:
        ERROR: Failed to build gem native extension.

        c:/Ruby193/bin/ruby.exe mkrf_conf.rb
Building native extensions.  This could take a while...


Gem files will remain installed in c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debu
g-ide-0.4.16 for inspection.
Results logged to c:/Ruby193/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/ext/
gem_make.out
Run Code Online (Sandbox Code Playgroud)

有人可以帮帮我吗?

ruby-debug

5
推荐指数
1
解决办法
8582
查看次数

使用Pow作为服务器在RubyMine中进行调试 - Ruby 2.1.1 + Rails 4

我已经开始使用RubyMine 6.我正在开发一个Rails 4,Ruby 2.1.1项目.我无法找到如何使用Pow作为服务器调试RubyMine.

你能指点我正确的方向吗?

ruby ruby-on-rails rubymine ruby-debug rack-pow

5
推荐指数
1
解决办法
1413
查看次数

RVM + Ruby 1.9.1 + ruby​​-debug =错误?

我试图在TextMate中的方法之间进行正确的导航.我很想在抽屉里找到它们的清单,但我想还没有这样的解决方案,对吧?因此我试图设置RubyAMPRuby 1.9.1-p378已安装的通道RVM,但有一些麻烦.RubyAMP需要ruby-debug,如果我尝试安装gem,这就是我得到的

$ rvm gem install ruby-debug
info: ruby-1.9.1-p378: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-darwin10] 
Building native extensions.  This could take a while...

ERROR:  Error installing ruby-debug:
    ERROR: Failed to build gem native extension.

/Users/andrei/.rvm/rubies/ruby-1.9.1-p378/bin/ruby extconf.rb
Can't handle 1.9.x yet
*** extconf.rb failed ***
Run Code Online (Sandbox Code Playgroud)

但是,gem页面说它应该与1.9.x一起使用.我该如何解决?

ruby gem textmate ruby-debug rvm

4
推荐指数
2
解决办法
2437
查看次数

我怎样才能让 ruby​​-debug-ide 工作?

我无法让我的 ruby​​-debug-ide 正常工作。我有一个基本的 Rails 应用程序,我想在 RubyMine 中进行调试。在启动 RubyMine 之前,我需要在我的 vagrant VM 中启用 rdebug-ide。当我导航到我的项目目录时,我已经在线阅读,我需要输入以下命令:

rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 - bin/rails s -b 0.0.0.0
Run Code Online (Sandbox Code Playgroud)

但是,当我运行此命令时,我收到此消息: 在此输入图像描述

我还尝试了上述命令的修改版本:(额外的破折号)

rdebug-ide --port 1236 --dispatcher-port 26166 --host 0.0.0.0 -- bin/rails s -b 0.0.0.0
Run Code Online (Sandbox Code Playgroud)

我得到的结果是: 在此输入图像描述 乍一看这看起来不错,但是服务器永远不会启动。它从不显示服务器信息,它只是坐在这里并挂起,直到我按 CTRL+C 退出服务器。我无法让 rdebug-ide 与 Rails 结合使用。有谁知道我该如何解决这个问题?

ruby ruby-debug vagrant ruby-on-rails-4 ruby-debug-ide

4
推荐指数
1
解决办法
2万
查看次数