开发者

Trace shortcut in intellij idea

开发者 https://www.devze.com 2023-04-11 10:24 出处:网络
Is there any shortcut to generate trace statements from selected variable, like ctrl-shift-0 in flash develop?

Is there any shortcut to generate trace statements from selected variable, like ctrl-shift-0 in flash develop? E.g.: If I select myVar in the below line and press "DesiredShortcut":

var myVar=5;

I'd like to get:

开发者_C百科 var myVar=5;

trace('myVar='+myVar);

Thanks


Consider using Live Templates.

For Java IntelliJ IDEA already has soutv template that will generate

System.out.println("var=" + var);

after pressing Tab.

You can define your own templates to log via your favorite logging framework.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号