probe.war使用
Writing JavaScript in the Node.js environment has always felt a bit more difficult; probably because browser developer tools have become incredibly powerful, interactive, and visually appealing. Using console.log
on the client side isn't the best of experiences and obviously isn't interactive.
在Node.js环境中编写JavaScript总是感到有些困难。 可能是因为浏览器开发人员工具已经变得功能强大,具有交互性并且在视觉上具有吸引力。 在客户端使用console.log
并不是最好的体验,并且显然不是交互式的。
Though not interactive, I've found that is an improvement over console.log
, providing me highlighted property types, lengths, and a nice visual tree view.
尽管不是交互式的,但我发现是对console.log
的改进,为我提供了突出显示的属性类型,长度和漂亮的可视化树状视图。
const probe = require('console-probe')const donut = { 'id': '0001', 'type': 'donut', 'name': 'Cake', 'description': 'A small fried cake of sweetened dough, typically in the shape of a ball or ring.', 'ppu': 0.55, 'common': true, 'batters': { 'batter': [ { 'id': '1001', 'type': 'Regular' }, { 'id': '1002', 'type': 'Chocolate' }, { 'id': '1003', 'type': 'Blueberry' }, { 'id': '1004', 'type': "Devil's Food" } ] }, // .....// Highlight nicely to consoleconst prober = probe.get()prober(donut)
console-probe is one of those nice, luxury utilities that can make debugging in a static environment just a bit better!
console-probe是那些不错的工具,可以在静态环境中进行调试好一些!
翻译自:
probe.war使用