| 838 | } |
| 839 | |
| 840 | void GlobalDebuggerUI::CreateGlobalAreaWidgets(UIContext* context) |
| 841 | { |
| 842 | auto globalArea = context->globalArea(); |
| 843 | if (!globalArea) |
| 844 | return; |
| 845 | |
| 846 | // Hacky way to create the Debugger Console. Note, since MainWindow internally keeps a list of scripting consoles, |
| 847 | // even if we construct a ScriptingConsole instance in the very same way, the instance will not be tracked by the |
| 848 | // MainWindow. The end result is the ScriptInstance will not be receiving callbacks like SetCurrentBinaryView, etc. |
| 849 | // However, since MainWindow registers these operations in the command palette, we can trigger the action here to |
| 850 | // emulate what happens when the user clicks the "Create Debugger Console" item. |
| 851 | if (context->contentActionHandler()) |
| 852 | { |
| 853 | auto widget = globalArea->widget("Debugger Console"); |
| 854 | if (!widget) |
| 855 | context->contentActionHandler()->executeAction("Create Debugger Console"); |
| 856 | |
| 857 | widget = globalArea->widget("Target Console"); |
| 858 | if (!widget) |
| 859 | context->contentActionHandler()->executeAction("Create Target Console"); |
| 860 | } |
| 861 | |
| 862 | auto widget = globalArea->widget("Stack Trace"); |
| 863 | if (!widget) |
| 864 | { |
| 865 | auto* globalThreadFramesContainer = new GlobalThreadFramesContainer("Stack Trace"); |
| 866 | globalArea->addWidget(globalThreadFramesContainer); |
| 867 | } |
| 868 | |
| 869 | widget = globalArea->widget("Debugger Modules"); |
| 870 | if (!widget) |
| 871 | { |
| 872 | auto* globalDebugModulesContainer = new GlobalDebugModulesContainer("Debugger Modules"); |
| 873 | globalArea->addWidget(globalDebugModulesContainer); |
| 874 | } |
| 875 | } |
| 876 | |
| 877 | |
| 878 | void GlobalDebuggerUI::CloseGlobalAreaWidgets(UIContext* context) |
nothing calls this directly
no outgoing calls
no test coverage detected