Aerilius / sketchup-console-plus

A better Ruby Console and IDE for integrated development in SketchUp.
MIT License
42 stars 16 forks source link

Trace information not displayed on error (Win) #18

Closed MichaelSchardt closed 7 years ago

MichaelSchardt commented 7 years ago

In SketchUp 2016, Windows, in case of an error no trace information is displayed in the console - this makes error tracking impossible without reverting to the native console.

For comparison:

Output of native SketchUp console (filename, linenumber being displayed):

errortest()
Error: #<NameError: undefined local variable or method `oops' for main:Object>
Filepath/Filename.rb:LineNo:in `errortest'
<main>:in `<main>'
SketchUp:1:in `eval'

Output of Console+:

errortest()
NameError: undefined local variable or method `oops' for main:Object
MichaelSchardt commented 7 years ago

Just checked this behaviour in Sketchup 2017 vs. 2016: In Sketchup 2017, part of the trace info is displayed on the righthand side of the console - at least filename and linenumber as hyperlink, pointing directy to the erroneous line in the editor (wow - nice!) This is not the case for Sketchup 2016 - nothing displayed at all.

Aerilius commented 7 years ago

Thanks for reporting! Since exceptions are propagated through internal methods of the console plugin, these would also show up in the backtrace. The console plugin drops these traces from the backtrace. Between SketchUp 2016 and 2017 the string has changed which signifies that a trace's source is the Ruby interpreter. Due to this, all traces were dropped.