---
title: "rails 3.0以上不能在netbean下调试的解决方法"
author: "pingfeng"
date: "2011-02-13T12:49:27Z"
tags: []
categories: ["编程语言"]
slug: "rails-3-0-netbean"
draft: false
lastmod: "2011-02-13T12:49:27Z"
id: 905182
url: "https://pingfeng.iteye.com/blog/905182"
---

netbean 6.9.1 在rails 3用 rdebug-ide 19但依然用 script/server去启动rails项目。实际上都用rails s了。

 

 

最好的解决方法是改rdebug-ide

 

ruby-1.9.2-p136/gems/ruby-debug-ide19-0.4.12/bin/rdebug-ide:79行

 

 

#!fix netbean can not debug problem!#  
\# save script name  
#Debugger::PROG\_SCRIPT = ARGV.shift  
script = ARGV.shift  
Debugger::PROG\_SCRIPT = (script =~ /script(\[\\\\\\/])rails/ ? Dir.pwd + $1 : '') + script  
puts Debugger::PROG\_SCRIPT