【问题标题】:I am seeing "truncated" inside Web SQL in Chrome DevTools when using Stetho使用 Stetho 时,我在 Chrome DevTools 中的 Web SQL 中看到“截断”
【发布时间】:2016-04-04 02:55:01
【问题描述】:

我正在使用 Stheto 检查我的 Android 应用程序中的数据库,但是当表中有很多对象时,我在所有列中都看到“截断”。我怎样才能看到它们?

【问题讨论】:

    标签: android stetho


    【解决方案1】:

    原因是 Stetho 内部的限制。在课堂上

    com.facebook.stetho.inspector.protocol.module.Database

    https://github.com/facebook/stetho/blob/36aa5bd356d9cf5893b9424b06a83dda9ec5e44f/stetho/src/main/java/com/facebook/stetho/inspector/protocol/module/Database.java

    有这个信息-

      /**
       * The protocol doesn't offer an efficient means of pagination or anything like that so
       * we'll just cap the result list to some arbitrarily large number that I think folks will
       * actually need in practice.
       * <p>
       * Note that when this limit is exceeded, a dummy row will be introduced that indicates
       * truncation occurred.
       */
      private static final int MAX_EXECUTE_RESULTS = 250;
    

    所以如果你真的需要更大的数字,你可以更改库的源代码,并添加不同的 Max。

    【讨论】:

    • 这个值应该在设置中公开! /掌脸
    猜你喜欢
    • 2021-06-02
    • 2019-08-13
    • 1970-01-01
    • 1970-01-01
    • 2013-06-16
    • 2021-03-06
    • 2016-09-04
    • 2018-07-02
    • 2015-12-04
    相关资源
    最近更新 更多