shuky19 / sublime_debugger

Interactive debugger for sublime
Apache License 2.0
429 stars 24 forks source link

RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout) #29

Closed tknerr closed 10 years ago

tknerr commented 10 years ago

I'm trying to get rubydebugger plugin up and running on Win7 (x64), Ruby 2.0.0p451, byebug 3.1.2, SublimeText 2.0.1 and RubyDebugger 0.3.0.

Whenever I want to start the debugging session via Alt + Shift + F6 a dos windows with a Ruby process pops up and remains open, but nothing ever happens.

Looking at the console I see this:

Exception in thread Thread-16:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\threading.py", line 484, in run
  File ".\debug_command.py", line 90, in <lambda>
  File ".\debug_command.py", line 103, in start_command_async
  File ".\debugger\ruby_imp\ruby_debugger.py", line 47, in run_command
  File ".\debugger\ruby_imp\ruby_custom_debug_command.py", line 10, in execute
  File ".\debugger\ruby_imp\ruby_debugger.py", line 25, in <lambda>
  File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 60, in start
  File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 124, in connect_debugger
  File ".\debugger\interfaces\debugger_connector.py", line 17, in log_message
  File ".\debugger\interfaces\debugger.py", line 19, in signal_text_result
  File ".\debug_command.py", line 147, in add_text_result
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)

Any ideas?

shuky19 commented 10 years ago

Can you validate it still happens? (I pushed a new version)

tknerr commented 10 years ago

Still getting this with v0.3.2:

Exception in thread Thread-3:
Traceback (most recent call last):
  File ".\threading.py", line 532, in __bootstrap_inner
  File ".\threading.py", line 484, in run
  File ".\debug_command.py", line 88, in <lambda>
  File ".\debug_command.py", line 101, in start_command_async
  File ".\debugger\ruby_imp\ruby_debugger.py", line 47, in run_command
  File ".\debugger\ruby_imp\ruby_custom_debug_command.py", line 10, in execute
  File ".\debugger\ruby_imp\ruby_debugger.py", line 25, in <lambda>
  File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 42, in start
  File ".\debugger\ruby_imp\ruby_debugger_connector.py", line 76, in validation_environment
RuntimeError: Must call on main thread, consider using sublime.set_timeout(function, timeout)
tknerr commented 10 years ago

Side note: no difference when using 32-bit sublime instead of 64-bit sublime

shuky19 commented 10 years ago

look at #26