Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Added option to reset layout to the default SublimeXdebug layout #65

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion AUTHORS
Expand Up @@ -2,4 +2,5 @@ Copyright 2012 William Cahill-Manley <https://github.com/Kindari/>
Copyright 2012 Eugene E. Kashpureff Jr <https://github.com/EugeneKay>
Copyright 2012 Marco Vito Moscaritolo <https://github.com/mavimo>
Copyright 2012 Arturo Linares <https://github.com/arturolinares>
Copyright 2012 John Watson <https://github.com/jotson>
Copyright 2012 John Watson <https://github.com/jotson>
Copyright 2013 Bashkim Isai <https://github.com/bashaus>
87 changes: 87 additions & 0 deletions Main.sublime-menu
@@ -0,0 +1,87 @@
[{
"id": "view",
"children": [
{
"id": "layout",
"children": [
{
"caption" : "XDebug",
"command" : "xdebug_layout"
}
]
}
]
},
{
"caption": "XDebug",
"id": "xdebug",
"children": [
{
"caption": "Start Debugging",
"command": "xdebug_listen"
},
{
"caption": "Stop Debugging",
"command": "xdebug_clear"
},
{
"caption": "-"
},
{
"caption": "Add/Remove Breakpoint",
"command": "xdebug_breakpoint"
},
{
"caption": "Clear All Breakpoints",
"command": "xdebug_clear_all_breakpoints"
},
{
"caption": "-"
},
{
"caption": "Continue",
"command": "xdebug_continue"
},
{
"caption": "Run",
"command": "xdebug_continue",
"args" : {"state" : "run"}
},
{
"caption": "Step Over",
"command": "xdebug_continue",
"args" : {"state" : "step_over"}
},
{
"caption": "Step Into",
"command": "xdebug_continue",
"args" : {"state" : "step_into"}
},
{
"caption": "Step Out",
"command": "xdebug_continue",
"args" : {"state" : "step_out"}
},
{
"caption": "Stop",
"command": "xdebug_continue",
"args" : {"state" : "stop"}
},
{
"caption": "Detach",
"command": "xdebug_continue",
"args" : {"state" : "detach"}
},
{
"caption": "-"
},
{
"caption": "Reset Layout",
"command": "xdebug_layout"
},
{
"caption": "View Command Menu",
"command": "xdebug"
}
]
}]
17 changes: 17 additions & 0 deletions Xdebug.py
Expand Up @@ -363,6 +363,23 @@ def run(self, edit):
view.view_breakpoints()


class XdebugLayoutCommand(sublime_plugin.TextCommand):
'''
Xdebug layout reset
'''

def run(self, edit):
global original_layout
global debug_view
window = sublime.active_window()
original_layout = window.get_layout()
debug_view = window.active_view()
window.set_layout({
"cols": [0.0, 0.5, 1.0],
"rows": [0.0, 0.7, 1.0],
"cells": [[0, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]]
})

class XdebugCommand(sublime_plugin.TextCommand):
'''
The Xdebug main quick panel menu
Expand Down