首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android stetho Google Developer工具资源被截断

Android stetho Google Developer工具资源被截断
EN

Stack Overflow用户
提问于 2016-11-02 15:15:34
回答 1查看 1.5K关注 0票数 8

使用Stetho和Stetho王国。

代码语言:javascript
复制
Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                        .build());

我可以在控制台上看到领域DB内容,但是最大索引是249,之后的所有值都被截断-

我怎样才能强迫它显示所有的价值呢?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-11-02 16:15:24

这是因为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

有这样的信息-

代码语言:javascript
复制
  /**
   * 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;

如果是Stetho王国,可以用这种方式改变限制-

代码语言:javascript
复制
Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this)
                                .withFolder(getCacheDir())
                                .withMetaTables()
                                .withDescendingOrder()
                                .withLimit(100000)
                                .build())
                        .build());
票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/40383510

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档