ruby-debug / debase

BSD 2-Clause "Simplified" License
209 stars 32 forks source link

Deprecation warning: warning: $SAFE will become a normal global variable in Ruby 3.0 #86

Closed qortex closed 4 years ago

qortex commented 4 years ago

This warning shows up in the console when a variable needs to be evaluated in the watch panel (using vscode and ruby-debug-ide):

warning: $SAFE will become a normal global variable in Ruby 3.0
ViugiNick commented 4 years ago

@qortex Can't find $SAFE occurrences, maybe the problem is on the vscode plugin side

qortex commented 4 years ago

Ok thanks, will look into it!

dkallipo commented 4 years ago

@qortex is there any solution to this problem? Why was the issue closed? Thanks

qortex commented 4 years ago

Don't know, didn't look into it more than that. It would be interesting to look up the root cause and know where it comes from, from debase or the vscode plugin.

dkallipo commented 4 years ago

I found the root cause: it's because of vs code's evaluation of global variables during debugging. One way to solve this is by hiding the 'variables' sub-panel on the side-bar.

qortex commented 4 years ago

Which project is it located in? We could work towards a fix PR.

denofevil commented 4 years ago

I think it might be handled on ruby-debug/ruby-debug-ide side, https://github.com/ruby-debug/ruby-debug-ide/blob/master/lib/ruby-debug-ide/commands/variables.rb#L41 //cc @ViugiNick

dkallipo commented 4 years ago

Which project is it located in? We could work towards a fix PR.

What I described was actually just a workaround to get rid of the annoying warning by just changing the VS code GUI settings. FYI, I resorted to downgrading to Ruby 2.6 because I was experiencing inconsistent and strange behavior by the VS code debugger after upgrading to Ruby 2.7. Not worth it.