37 Module function to get characterising data for the debugger interface. |
37 Module function to get characterising data for the debugger interface. |
38 |
38 |
39 @return list of the following data. Client type (string), client |
39 @return list of the following data. Client type (string), client |
40 capabilities (integer), client type association (list of strings) |
40 capabilities (integer), client type association (list of strings) |
41 """ |
41 """ |
42 return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations] |
42 if Preferences.getDebugger("RubyInterpreter"): |
|
43 return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations] |
|
44 else: |
|
45 return ["", 0, []] |
43 |
46 |
44 |
47 |
45 class DebuggerInterfaceRuby(QObject): |
48 class DebuggerInterfaceRuby(QObject): |
46 """ |
49 """ |
47 Class implementing the Ruby debugger interface for the debug server. |
50 Class implementing the Ruby debugger interface for the debug server. |
141 @return client process object (QProcess) and a flag to indicate |
144 @return client process object (QProcess) and a flag to indicate |
142 a network connection (boolean) |
145 a network connection (boolean) |
143 """ |
146 """ |
144 interpreter = Preferences.getDebugger("RubyInterpreter") |
147 interpreter = Preferences.getDebugger("RubyInterpreter") |
145 if interpreter == "": |
148 if interpreter == "": |
146 interpreter = "/usr/bin/ruby" |
149 E5MessageBox.critical( |
|
150 None, |
|
151 self.tr("Start Debugger"), |
|
152 self.tr("""<p>No Ruby interpreter configured.</p>""")) |
|
153 return None, False |
147 debugClient = os.path.join( |
154 debugClient = os.path.join( |
148 getConfig('ericDir'), "DebugClients", "Ruby", "DebugClient.rb") |
155 getConfig('ericDir'), "DebugClients", "Ruby", "DebugClient.rb") |
149 |
156 |
150 redirect = str(Preferences.getDebugger("RubyRedirect")) |
157 redirect = str(Preferences.getDebugger("RubyRedirect")) |
151 |
158 |