From ce6edd2a45d0bd2e3c05ff3314587cd60e8c9ccb Mon Sep 17 00:00:00 2001 From: "YUKI \"Piro\" Hiroshi" Date: Tue, 14 Nov 2023 14:58:27 +0900 Subject: [PATCH] Output more debuggable log --- common/Context.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/common/Context.js b/common/Context.js index 2b3ce69..c23a5ac 100644 --- a/common/Context.js +++ b/common/Context.js @@ -8,6 +8,7 @@ import { configs, collectAncestors, + log, } from './common.js'; import * as Constants from './constants.js'; @@ -17,8 +18,10 @@ export class Context { this.modified = !!modified; this.withContainer = !!withContainer; - if (mode) + if (mode) { + log('new context, mode=', mode); this.mode = mode; + } if (multiselectedTabs) this.multiselectedTabs = multiselectedTabs; @@ -115,6 +118,8 @@ export class Context { if ('$mode' in this) return this.$mode; + log('resolving mode, isTreeParent=', this.isTreeParent, ', modified=', this.modified); + return this.$mode = this.isTreeParent ? (this.modified ? configs.modeForNoSelectionTreeModified : @@ -195,6 +200,8 @@ export class Context { if (this.shouldCopyAll) await this.resolveAllTabs(); + log('getTabsToCopy mode=', this.mode, ', shouldCopyAll=', this.shouldCopyAll); + this.$tabsToCopy = this.multiselectedTabs.length > 1 ? this.multiselectedTabs : this.shouldCopyAll ?