> ary = new Array('test msg kinda long but gets the point across and such and it shows ellipsises after a certain point in my test. test msg kinda long but gets the point across and such and it shows ellipsises after a certain point in my test. test msg kinda long but gets the point across and such and it shows ellipsises after a certain point in my test. test msg kinda long but gets the point across and such and it shows ellipsises after a certain point in my test. test msg kinda long but gets the point across and such and it shows ellipsises after a certain point in my test.');
> JSON.stringify(ary)
"["test msg kinda long but gets the point across and such and it shows ellipsises... (length: 116)"
Run Code Online (Sandbox Code Playgroud)
我真的想要完整的对象,但 Chrome 想要将结果修剪为大约 80 个字符。我在控制台设置中看不到任何会改变这一点的东西。
Wic*_*ams 64
我最近发现 Chrome 开发工具具有copy复制到剪贴板的功能 - 不会被截断!它还可以方便地将对象序列化为 JSON,将 DOM 元素序列化为 HTML,直接到剪贴板。
copy(someLongString); // no truncation!
copy({ foo : true }); // JSON
copy(someDOMElement); // HTML
Run Code Online (Sandbox Code Playgroud)
由于我试图将一个长字符串复制到剪贴板以在其他地方进行分析,这完全满足了我的需求
res*_*ing 22
console.dir(longstringhere) 作品。
copy也没有为我工作,它说的是undefined。
小智 5
此行为在 Chrome 版本 37.0.2062.103 中仍然存在。
您可以在调试时使用以下方法解决此问题: document.write('My Real Long Debug Text');
| 归档时间: |
|
| 查看次数: |
28576 次 |
| 最近记录: |