├── .gitignore ├── LICENSE.txt ├── README.md ├── debugger.gd ├── plugin.cfg └── screenshot.png /.gitignore: -------------------------------------------------------------------------------- 1 | # import files generated by godot 2 | *.import 3 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Summary 2 | 3 | If you enable debugging with Godot/C#, you have to run the debugger through the IDE every single time you launch Godot. If not, Godot will quickly fail. Going to the project settings and disabling the debugger is also tedious. 4 | 5 | That's where this plugin comes in: it adds a small, simple toggle for running Godot with or without debugging: 6 | 7 | ![screenshot](screenshot.png) 8 | 9 | # Installation 10 | 11 | 1. Create an `addons` folder inside your project 12 | 2. Git clone this repo inside the addons folder 13 | 3. Go to `Project Settings` -> Addons and enable this plugin. 14 | 4. You will see a `Debugger` menu on the very right of your UI next to the `Build` menu. -------------------------------------------------------------------------------- /debugger.gd: -------------------------------------------------------------------------------- 1 | tool 2 | extends EditorPlugin 3 | 4 | # Popup Menu 5 | var menu_button 6 | var menu_popup 7 | 8 | # Setting Constants 9 | const WAIT_FOR_DEBUGGER = "mono/debugger_agent/wait_for_debugger" 10 | 11 | func _enter_tree(): 12 | menu_button = MenuButton.new() 13 | menu_button.text = "Debugger" 14 | 15 | menu_popup = menu_button.get_popup() 16 | menu_popup.hide_on_item_selection = false 17 | menu_popup.hide_on_state_item_selection = false 18 | menu_popup.hide_on_checkable_item_selection = false 19 | menu_popup.add_check_item("Wait for debugger", 1) 20 | menu_popup.connect("id_pressed", self, "debugger_menu_id_pressed") 21 | menu_button.connect("about_to_show", self, "debugger_menu_about_to_show") 22 | 23 | add_control_to_container(CONTAINER_TOOLBAR, menu_button) 24 | 25 | func _exit_tree(): 26 | menu_button.free() 27 | 28 | func debugger_menu_about_to_show(): 29 | var wfd_checked = get_setting(WAIT_FOR_DEBUGGER) 30 | menu_popup.set_item_checked(0, wfd_checked) 31 | 32 | func debugger_menu_id_pressed(id): 33 | match id: 34 | 1: 35 | var checked = menu_popup.is_item_checked(id-1) 36 | menu_popup.set_item_checked(id-1, !checked) 37 | set_setting(WAIT_FOR_DEBUGGER, !checked) 38 | 39 | func get_setting(setting): 40 | if not ProjectSettings.has_setting(setting): 41 | print("Setting doesn't exist: ", setting) 42 | return null 43 | return ProjectSettings.get_setting(setting) 44 | 45 | func set_setting(setting, value): 46 | if not ProjectSettings.has_setting(setting): 47 | print("Setting doesn't exist: ", setting) 48 | return 49 | 50 | ProjectSettings.set(setting, value) 51 | ProjectSettings.save() -------------------------------------------------------------------------------- /plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name = "MonoDebuggerQM" 4 | description = "Quick menu for the mono debugger settings" 5 | author = "exts" 6 | version = "1.0" 7 | script = "debugger.gd" -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/exts/MonoDebuggerQM/a721225ac5ab1b95b62218fa54920924a5ef54fe/screenshot.png --------------------------------------------------------------------------------