在Appcelerator Titanium中,如何禁用javascript代码优化以简化调试?

在Appcelerator Titanium中,如何禁用javascript代码优化以简化调试?,javascript,debugging,titanium,appcelerator,titanium-alloy,Javascript,Debugging,Titanium,Appcelerator,Titanium Alloy,我正在使用一款以iOS为目标的应用程序,该应用程序使用钛(合金)制成;我希望能够在Titanium Studio中关闭Javascript代码优化,但无法通过谷歌搜索找到任何东西,也无法搜索到任何东西。Tianium编译时会生成优化的javascript文件…这使得交互调试变得困难,因为在许多情况下,它会将几行干净、可读的代码组合成一行。。。这使得使用调试器进入代码变得困难 例如: 这个 使用Tianium Studio v3.2.3.201404181442 如果有一个设置可以暂时禁用此行为,

我正在使用一款以iOS为目标的应用程序,该应用程序使用钛(合金)制成;我希望能够在Titanium Studio中关闭Javascript代码优化,但无法通过谷歌搜索找到任何东西,也无法搜索到任何东西。Tianium编译时会生成优化的javascript文件…这使得交互调试变得困难,因为在许多情况下,它会将几行干净、可读的代码组合成一行。。。这使得使用调试器进入代码变得困难

例如: 这个

使用Tianium Studio v3.2.3.201404181442

如果有一个设置可以暂时禁用此行为,以便交互式调试更容易,您有什么想法

提前谢谢。 --斯科特


编辑:一位同事建议在代码中添加一些日志语句(比如在“for”之后)语句;这确实阻止了优化器排列代码。这不完全是我想要做的,但至少让我向前迈进了。我仍然想找到一种方法来关闭或关闭JS优化器级别。

试试
Tianium build-p ios--跳过JS minify

从Tianium build--help:

Build Flags:
   --legacy           build using the old Python-based builder.py; deprecated
   --skip-js-minify   bypasses JavaScript minification; simulator builds are never minified; only
                      supported for Android and iOS  [default: false]
   -b, --build-only   only perform the build; if true, does not install or run the app
   -f, --force        force a full rebuild

好主意;尝试了一下……仍然将代码优化为一行。:(因为我的项目是Alloy项目(忘了提到这一点),我找到了更多可以在Alloy.jmk-event.alloyConfig.beautify=true和false中设置的设置,两者都没有达到预期效果。
 if (Array.isArray(detailItemArray)) for (var z = 0; detailItemArray.length > z; z++) 0 === z ? _.isString(termItemArray[y].title) ? htmlArray.push(html.termItem(termItemArray[y].title, html.processStyle(detailItemArray[z]["style"], detailItemArray[z]["detail"]))) : htmlArray.push(html.processStyle(detailItemArray[z]["style"], detailItemArray[z]["detail"])) : htmlArray.push(html.processStyle(detailItemArray[z]["style"], detailItemArray[z]["detail"])); else _.isString(termItemArray[y].title) ? htmlArray.push(html.termItem(termItemArray[y].title, detailItemArray["detail"])) : htmlArray.push(html.termItemNoTitle(html.processStyle(detailItemArray["style"], detailItemArray["detail"])));
Build Flags:
   --legacy           build using the old Python-based builder.py; deprecated
   --skip-js-minify   bypasses JavaScript minification; simulator builds are never minified; only
                      supported for Android and iOS  [default: false]
   -b, --build-only   only perform the build; if true, does not install or run the app
   -f, --force        force a full rebuild