Browse Source

Adds debugging flag to container

main
Eric Amodio 2 years ago
parent
commit
3c6ff5d0a9
2 changed files with 14 additions and 2 deletions
  1. +13
    -1
      src/container.ts
  2. +1
    -1
      src/views/viewBase.ts

+ 13
- 1
src/container.ts View File

@ -1,4 +1,11 @@
import { ConfigurationChangeEvent, ConfigurationScope, Event, EventEmitter, ExtensionContext } from 'vscode';
import {
ConfigurationChangeEvent,
ConfigurationScope,
Event,
EventEmitter,
ExtensionContext,
ExtensionMode,
} from 'vscode';
import { getSupportedGitProviders } from '@env/providers';
import { Autolinks } from './annotations/autolinks';
import { FileAnnotationController } from './annotations/fileAnnotationController';
@ -292,6 +299,11 @@ export class Container {
return this._contributorsView;
}
@memoize()
get debugging() {
return this._context.extensionMode === ExtensionMode.Development;
}
private _fileAnnotationController: FileAnnotationController;
get fileAnnotations() {
return this._fileAnnotationController;

+ 1
- 1
src/views/viewBase.ts View File

@ -110,7 +110,7 @@ export abstract class ViewBase<
) {
this.disposables.push(once(container.onReady)(this.onReady, this));
if (Logger.isDebugging || this.container.config.debug) {
if (this.container.debugging || this.container.config.debug) {
function addDebuggingInfo(item: TreeItem, node: ViewNode, parent: ViewNode | undefined) {
if (item.tooltip == null) {
item.tooltip = new MarkdownString(

Loading…
Cancel
Save