show source better
still wip
This commit is contained in:
parent
4c342d064d
commit
509aff9552
@ -25,7 +25,7 @@ class DebugServer < Opal::Server
|
||||
end
|
||||
end
|
||||
|
||||
run Opal::Server.new { |s|
|
||||
run Opal::Sprockets::Server.new { |s|
|
||||
s.main = 'debugger.js.rb'
|
||||
s.append_path 'lib'
|
||||
s.append_path 'assets'
|
||||
|
@ -36,7 +36,8 @@ class InstructionView < ListView
|
||||
|
||||
def instruction_text
|
||||
return "" unless @interpreter.instruction
|
||||
@interpreter.instruction.to_s
|
||||
text = @interpreter.instruction.to_s
|
||||
text.split("(").first
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -45,7 +45,7 @@ class ObjectView < ListView
|
||||
end
|
||||
|
||||
def content_elements
|
||||
fields = [ConstantView.new("li" , "----------------------------------")]
|
||||
fields = [ConstantView.new("li" , "---------------------------------")]
|
||||
object = @object
|
||||
if object and ! object.is_a?(String)
|
||||
object.get_instance_variables.each do |variable|
|
||||
|
@ -20,13 +20,13 @@ class SourceView < ElementView
|
||||
update_method
|
||||
case i.source
|
||||
when Mom::Instruction
|
||||
id = i.source.object_id.to_s(16)
|
||||
if e = @text.at_css("#i#{id}")
|
||||
if (old = @text.at_css(".fade_in"))
|
||||
old.remove_class("fade_in")
|
||||
end
|
||||
e.add_class "fade_in"
|
||||
end
|
||||
@ticker.text = i.source.class.name
|
||||
# if e = @text.at_css("#i#{id}")
|
||||
# if (old = @text.at_css(".fade_in"))
|
||||
# old.remove_class("fade_in")
|
||||
# end
|
||||
# e.add_class "fade_in"
|
||||
# end
|
||||
when String
|
||||
@ticker.text = i.source
|
||||
when Risc::Instruction
|
||||
|
Loading…
Reference in New Issue
Block a user