zoukankan      html  css  js  c++  java
  • SAP UI5应用的调试标志位的本地存储逻辑

    We know that once we enable debug mode via “Ctrl+Alt+Shift+P”, this setting will be persisted: even if you turn off your laptop and launch the application tomorrow, the debug mode will still be there.

    In Chrome development tool, there is an Application tab which records this setting via key value pair using Local Storage.

    As usual we can still use debug to investigate what has happened when the checkbox “Use Debug Sources(reload)” is clicked.
    In Chrome development tool Elements tab, click the small arrow icon to enter the element inspection mode, then click the checkbox, then its html source code will be automatically navigate.

    Perform global search via keyword “useDbgSources”, and then we can find the event handler onUseDbgSources for debug mode set:

    Set a breakpoint on this function, then mark the checkbox in UI, breakpoint is triggered as expected:

    Within the function, we can know the debugging flag is set via localStoage API: window.localStorage.setItem

    This API will change the following file in my laptop:


    If I open the changed file via some SQLite management tool, I can find the corresponding entry with key sap-ui-debug and value ‘X’ set:

    要获取更多Jerry的原创文章,请关注公众号"汪子熙":

  • 相关阅读:
    查看网站上保存的密码
    前端图片预览
    Amaze UI的一点总结
    简单实现图片验证码
    获取网页数据的例子
    谈谈网页中的ajax
    网页小技巧-360doc个人图书馆复制文字
    Js中的4个事件
    网页页面蒙版实现
    Spring+SprinMVC配置学习总结
  • 原文地址:https://www.cnblogs.com/sap-jerry/p/13540568.html
Copyright © 2011-2022 走看看