新手问题 aptana 里怎么才能 debug

542307299 · July 02, 2013 · Last by 542307299 replied at July 02, 2013 · 5079 hits

网上说是这几部

  1. 检查是否安装 ruby-debug-ide $ gem list
  2. 如果没有安装,则安装 ruby-debug-ide $ gem install ruby-debug-ide、
  3. 在 Aptana Studio 3 中打开你的项目,开启 Debug Server: App Explorer -> Gear 图标的下拉菜单 -> Debug Server 我的版本是 ruby1.8.7,ralis2.3.17,但是 gem install ruby-debug-ide 发现还是不能 debug 啊,安装时报下边的问题 Building native extensions. This could take a while... Successfully installed ruby-debug-ide-0.4.17 1 gem installed Installing ri documentation for ruby-debug-ide-0.4.17... ERROR: While executing gem ... (NoMethodError) undefined method `map' for Gem::Specification:Class

ruby 开发用 aptana 的不多,现在 debug 一般用 pry;看看这个 http://www.google.com.hk/search?q=pry+debug&oq=pry+debug&sourceid=chrome&ie=UTF-8

#1 楼 @Magic 您好,我才开始学习 ruby,也不知道现在开发一般用什么,请教下是 eclipse 么?还有 ruby 调试能不能像在 eclipse 里那样直接打断点之类的调试

ruby 开发一般都不用 IDE,我用的是 sublime;这个 debug 工具是 rails 里的一个 gem,你安装上去之后,在需要断点的代码处写上一句 binding.pry,之后执行的时候到这就会断点了。具体看看@xdite的这篇 blog http://blog.xdite.net/posts/2012/08/12/pry-the-new-debugger/

#3 楼 @Magic 谢谢,我好好看看这篇 blog,多谢啦

You need to Sign in before reply, if you don't have an account, please Sign up first.