SAP UI5 debug mode

80 阅读1分钟

Created by Jerry Wang, last modified on Nov 05, 2014

  • bDebugSources
  • isIE
  • sap-ui-debug
  • localStorage
  • getItem
  • abap.js
  • bootstrap
  • defer
  • window.document.write
  • document
  • write
  • sScriptTags

launch pad line 91行有当前UI 运行mode的判断. 如果当前运行在non debug mode下,则line 110 动态加载core-min-1.js, core-min-2.js 和core-min-3.js:

 

三个js的加载可以在network里观察到:

在UI上使用ctrl+shift+alt+p的组合键 enable debug mode:

之后bDebugSources就为true,上述三个js将不会再被加载:

 

取而代之的是加载core-min-0-dbg.js:

使用Chrome的格式化功能之后,能发现dbg.js的加载发生在core-min-0.js的7829行:

<img src="user-images.githubusercontent.com/5669954/273…

\

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