Can I override DebugConfigurationWidget?

I didn’t find “Symbol(‘DebugConfigurationWidgetFactory’)”.
Do I need to change the source code and submit a PR?

@kaizhi thank you for the discussion, the widget is already injectable meaning I believe it can be rebind without any issues. If you do see limitations please feel free to report an issue upstream if it doesn’t already exist (to track the feature), and don’t hesitate to improve the extensibility :+1:

After I rebind widget, error log shows:

Uncaught (in promise) Error: No widget factory 'outputView' has been registered.
    at e.<anonymous> (widget-manager.ts:217)
    at bundle.js:2
    at Object.next (bundle.js:2)
    at bundle.js:2
    at new Promise (<anonymous>)
    at o (bundle.js:2)
    at e.getOrCreateWidget (bundle.js:2)
    at t.get (view-contribution.ts:91)
    at e.init (output-toolbar-contribution.tsx:43)
    at instantiation.ts:40

code:

    rebind(WidgetFactory).toDynamicValue(({ container }) => ({
        id: DebugWidget.ID,
        createWidget: () => {
            let child = DebugWidget.createContainer(container);
            child.rebind(DebugConfigurationWidget).to(CustomDebugConfigurationWidget as any);
            return child.get(DebugWidget);
        }
    })).inSingletonScope();

Where is my code wrong? :sweat_smile: