javascript - 为什么 console.table 不显示最后一个条目

标签 javascript google-chrome console google-chrome-devtools

我遗漏了一些非常明显的东西,但它出现在我的 chrome 浏览器版本 103.0.5060.134(官方构建)(64 位)上,最后一个条目丢失了:

const objectTest = { 'one' : 'this is object one' , 'two' : 'this is object two' , 'three' : 'this is object three' } ; 
console.table (objectTest) ;     // appears to skip the final entry
console.log(objectTest.three) ;  // final entry is available
我该怎么做才能得到 console.table显示最后一个条目?
我想开始使用console.table除了JSON.stringify但前提是我能让​​它正常工作。
对我来说更奇怪的是,Firefox 似乎可以正常工作。
编辑 :它在 chrome 100-102 和 chrome 104-105 上工作正常。它似乎在 chrome 103 上无法正常工作。我在 browserstack 上试过了。
但同样,我假设我做错了什么。

最佳答案

我可以在 Chrome 103.0.5060.134 中重现:

但是,正如您所看到的,最后一个条目并没有真正丢失,它只是隐藏在那个不必要的水平滚动条下方。如果您选择表格中的文本,您仍然可以复制它并找出选择:

该错误已被报告至少五次:

  • Issue 1339628: console.table is missing last element in array
  • Issue 1340625: console.table horizontal scrollbar obscures last row
  • Issue 1344504: console.table does not show all properties
  • Issue 1346599: unnecessary scroll bars in console.table obscure content
  • Issue 1347572: console.table() displays a horizontal scrollbar overlaying the last table row .

  • This has been fixed and the fix will roll out soon into Stable channel.

    关于javascript - 为什么 console.table 不显示最后一个条目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73141877/

    相关文章:

    css - 列数在 chrome 的字段中不起作用

    java - 在java程序中使用浏览器的证书

    windows - 通过控制台应用程序打开具有特定 URL 的浏览器

    javascript - 带有两个溢出 :auto; object disappears 的 div 的 jquery sortable()

    javascript - JSON 到 ajax 中的 HTML 表

    javascript - paypal结账按钮在javascript中获取json响应

    javascript - 从表中删除行时,剩余的行向上/向下移动

    javascript - 图片库预览在 Chrome 和 Safari 中无法正确显示

    c - Windows 控制台颜色列表在哪里?

    javascript - 如何在 Google Chrome JavaScript 控制台中打印调试消息?