Debugger/DebuggerInterfaceRuby.py

changeset 3356
22633c0739e2
parent 3354
8d69c9dfb5e2
child 3357
2390df6f42ba
equal deleted inserted replaced
3354:8d69c9dfb5e2 3356:22633c0739e2
17 from . import DebugProtocol 17 from . import DebugProtocol
18 from . import DebugClientCapabilities 18 from . import DebugClientCapabilities
19 19
20 import Preferences 20 import Preferences
21 import Utilities 21 import Utilities
22 from Globals import isWindowsPlatform
23 22
24 from eric5config import getConfig 23 from eric5config import getConfig
25 24
26 25
27 ClientDefaultCapabilities = \ 26 ClientDefaultCapabilities = \
38 Module function to get characterising data for the debugger interface. 37 Module function to get characterising data for the debugger interface.
39 38
40 @return list of the following data. Client type (string), client 39 @return list of the following data. Client type (string), client
41 capabilities (integer), client type association (list of strings) 40 capabilities (integer), client type association (list of strings)
42 """ 41 """
43 return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations] 42 if Preferences.getDebugger("RubyInterpreter"):
43 return ["Ruby", ClientDefaultCapabilities, ClientTypeAssociations]
44 else:
45 return ["", 0, []]
44 46
45 47
46 class DebuggerInterfaceRuby(QObject): 48 class DebuggerInterfaceRuby(QObject):
47 """ 49 """
48 Class implementing the Ruby debugger interface for the debug server. 50 Class implementing the Ruby debugger interface for the debug server.
141 console window (boolean) 143 console window (boolean)
142 @return client process object (QProcess) and a flag to indicate 144 @return client process object (QProcess) and a flag to indicate
143 a network connection (boolean) 145 a network connection (boolean)
144 """ 146 """
145 interpreter = Preferences.getDebugger("RubyInterpreter") 147 interpreter = Preferences.getDebugger("RubyInterpreter")
146 if interpreter == "" and not isWindowsPlatform():
147 interpreter = "/usr/bin/ruby"
148 if interpreter == "": 148 if interpreter == "":
149 E5MessageBox.critical( 149 E5MessageBox.critical(
150 None, 150 None,
151 self.tr("Start Debugger"), 151 self.tr("Start Debugger"),
152 self.tr("""<p>No Ruby interpreter configured.</p>""")) 152 self.tr("""<p>No Ruby interpreter configured.</p>"""))

eric ide

mercurial