- Home /
Debug.logger
I am really really really annoyed by this. Ever since Unity 5.3 this little piece of garbage keeps popping up in my intellisense for visual studio.
I normally just type d + . + l and this gives me Debug.Log. Now I have to type d + . + shift + l. It doesn't seem much but it's really annoying! It makes me want to stop coding and think about how useless is this logger! What is the logger even for? You know what, it doesn't matter because I would be using Debug.Log more often than Debug.logger.
What's worse is often times I would forget pressing shift, so it would give me this Debug.logger. Now I have to press backspace 6 times + shift + l.
I tried my best to move on. I tried to use print. But it just doesn't feel right....I miss my Debug.Log.
I swear whoever made this Debug.logger accessible is Satan.
Does anyone know how to remove this from visual studio intellisense?
I'm a debug.log guy and I sympathize with you 100%. I've replaced 4 'backspace' keys already..
Seriously though, I suppose we'll have to adopt print. I always thought of it as a JS/Unity script convention.
I'm not surprised to find others "suffering" ;p with this relatively $$anonymous$$or, but majorly annoying 5.x addition. Please UT, bring back "d+.+l" !
Answer by wibble82 · Dec 21, 2015 at 01:25 PM
I'm afraid you'll have to get used to it! 'logger' is the 'default' logger that the debug functions output to, though I'll confess there seems to be little use exposing it, as (according to the documentation at least) you can't change it.
Satanic accusations aside, if you personally can't get used to pressing shift+l, maybe write your own extension method called 'Debug.log' to beat logger! Or create a 'print' extension method.
Answer by paolo_lionhg · Dec 21, 2015 at 04:37 PM
lol the solution
class Debug
{
public static void Log(string s)
{
Debug.Log(s);
}
}
Thanks for the idea @wibble82. Now the the Debug class doesn't have the other junk that it had. I should have been doing this before.
Unfortunately this won't take you to the proper line of code if you click it :/ Trading in one annoyance for another.
yes. double clicking in the editor will not bring you to the line of code. you need to trace it by looking at the calls.
but scrap this solution. i tried to build my android game using this and it crashes. i forgot the error. just don't use this.