javascript - configure Turbo Console Log to automatically wrap logged messages with JSON.stringify() - Stack Overflow

How can I configure Turbo Console Log to automatically wrap logged messages with JSON.stringify(), such

How can I configure Turbo Console Log to automatically wrap logged messages with JSON.stringify(), such as to achieve the following output format?

Default Output (Example):

console.log("messages:", messages)

Desired Output:

console.log("messages:", JSON.stringify(messages, null, 2));

How can I configure Turbo Console Log to automatically wrap logged messages with JSON.stringify(), such as to achieve the following output format?

Default Output (Example):

console.log("messages:", messages)

Desired Output:

console.log("messages:", JSON.stringify(messages, null, 2));
Share Improve this question edited Mar 3 at 20:11 Imad asked Mar 3 at 2:08 ImadImad 113 bronze badges 1
  • have you tried to modify settings.json ? – Stan Commented Mar 3 at 4:46
Add a comment  | 

1 Answer 1

Reset to default 0

you can try and add the following to your settings.json:

"turboConsoleLog.logMessage": "console.log(\"${variable}:\", JSON.stringify(${variable}, null, 2));"

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745112402a4611923.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信