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
1 Answer
Reset to default 0you can try and add the following to your settings.json
:
"turboConsoleLog.logMessage": "console.log(\"${variable}:\", JSON.stringify(${variable}, null, 2));"