How to close all debugger tabs with a script?

Hi,

I’m stuck… most of the time I end up with lots of debugger tabs, manually closing 'em is tedious. How could I close all such with a (user)script?

Screenshot_2021-04-20_11-18-07

Hey @agroszer,

All the debug tabs are managed under ko.dbg.tabManager = {}.

You should be able to loop through that objects keys and call ko.dbg.tabManager.closeTab(ko.tabManager.tabManagers[key]) on each.

var keys = Object.keys(ko.dbg.tabManager.tabManagers);
keys.forEach((key) => {
    ko.dbg.tabManager.closeTab(ko.dbg.tabManager.tabManagers[key])
});

yay! works like a charm, thanks!

1 Like