Ziv Sion
Ziv Sion

Reputation: 143

Rider shortcut for Debug.Log()?

Does "Rider" have a shortcut to Debug.Log()? It will be really helpful and will probably shorten my encoding time significantly - just kidding, just be more comfortable

Upvotes: 0

Views: 1020

Answers (2)

happylittle
happylittle

Reputation: 11

Rider's own Live Templates feature has a shortcut to Debug.Log(), where you can simply type "logvar" and Rider will automatically complete the code for you, as follows:

Debug.Log("var = " + var);

But you still need to change the value of "var".Here is a quicker way to log a variable, open Rider Settings -> Editor -> Live Templates -> Unity, find " logvar ", click Edit Variables -> Change Macro, select " Clipboard Content " and save. After that, if we need to log a variable (here, for example the int value: updateCount), we can simply copy updateCount to the clipboard, type "logvar" where we need to log it and press the tab key. The logging is done quickly for us:

Debug.Log("updateCount =" + updateCount);

Upvotes: 1

Federico Rossi
Federico Rossi

Reputation: 413

If you mean code snippets, or live templates as rider calls them, no, there is not.

Here you can take a look at ones that are available out of the box.

To solve you could create your own as described here, I would go for something similiar to cw, so dw.

Hope I've been helpful.

Upvotes: 1

Related Questions