|
From: <mba...@us...> - 2007-02-28 22:29:55
|
Revision: 2069
http://svn.sourceforge.net/rubyeclipse/?rev=2069&view=rev
Author: mbarchfe
Date: 2007-02-28 14:29:31 -0800 (Wed, 28 Feb 2007)
Log Message:
-----------
use rdebug.cmd if it exists
Modified Paths:
--------------
trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RDebugVMDebugger.java
Modified: trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RDebugVMDebugger.java
===================================================================
--- trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RDebugVMDebugger.java 2007-02-28 21:40:19 UTC (rev 2068)
+++ trunk/org.rubypeople.rdt.launching/src/org/rubypeople/rdt/internal/launching/RDebugVMDebugger.java 2007-02-28 22:29:31 UTC (rev 2069)
@@ -1,5 +1,6 @@
package org.rubypeople.rdt.internal.launching;
+import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -32,7 +33,8 @@
// Set it up to use rdebug executable
Map map = config.getVMSpecificAttributesMap();
if (map == null) map = new HashMap();
- map.put(IRubyLaunchConfigurationConstants.ATTR_RUBY_COMMAND, "rdebug");
+ String executable = findRDebugExecutable(fVMInstance.getInstallLocation()) ;
+ map.put(IRubyLaunchConfigurationConstants.ATTR_RUBY_COMMAND, executable);
config.setVMSpecificAttributesMap(map);
super.run(config, launch, monitor);
@@ -58,5 +60,15 @@
protected RubyDebuggerProxy getDebugProxy(RubyDebugTarget debugTarget) {
return new RubyDebuggerProxy(debugTarget, RDebugVMDebugger.getDirectoryOfRubyDebuggerFile(), true);
}
+
+ public static String findRDebugExecutable(File vmInstallLocation) {
+ // see StandardVMRunner.constructProgramString
+ String cmd = "rdebug" ;
+ String path = vmInstallLocation + File.separator + "bin" + File.separator + "rdebug.cmd" ;
+ if (new File(path).exists()) {
+ cmd = "rdebug.cmd" ;
+ }
+ return cmd ;
+ }
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|