したがって、少なくとも Closure Compiler では、デバッグは新しい意味を持っているようです。
私はかなり大きなコード ベースを持っており、問題を切り分けるのは難しい作業です。エントリ ポイント クラスで、依存関係をインスタンス化します。これらの 1 つが正しく作成されていません。オブジェクトはそこにありますが、そのコンストラクターが呼び出されていません。
これは ADVANCED モードでのみ発生するため、 --debug フラグを渡そうとしましたが、ほら、バグがなくなり、コンストラクターが呼び出されます。それは驚くべきことです。特定のコードをコピーして貼り付けることはできません。
/**
* @param {Element} parent
* @param {Object} opts
* @constructor
*/
ns.App = function(parent, opts) {
this.options = new ns.Options(opts || {});
var w = this.options.width || parent.offsetWidth;
var h = this.options.height || parent.offsetHeight;
this.view = new ns.AppView(w, h);
this.history = new ns.CommandManager();
// ....
// this one doesn't get called
this.amx_ = new ns.ActivityManager(this, this.options);
// this one does
this.output_ = new ns.Writer();
this.bind_();
};