Kindari / SublimeXdebug

Xdebug Interface for Sublime Text 2
Other
367 stars 66 forks source link

Added Main.sublime-menu to help with development #64

Closed bashaus closed 8 years ago

bashaus commented 11 years ago

Hello William,

Love the work that you're doing on this project - found it a few days ago and it's made development with Sublime Text 2 so much easier. I thought it would be a nice feature if the commands were more accessible on the main menu. I have added a Main.sublime-menu manifest. Would be great if you could add it to your project to help out others too.

fcgrx commented 11 years ago

I've been debugging with this package for a few days, it works fairly smoothly, however when I try to Start or Stop debugging using the Main.sublime-menu file (or any variation I came up with before I realized it was part of the package!) the debugger fails to launch the project's specified URL in my browser. If I do the same Start or Stop using shift-f8, it works fine. Have you tried this out?

bashaus commented 11 years ago

Hey. I haven't had this problem but I am using a plugin for chrome to proxy my xdebug requests

dietrich-stein commented 11 years ago

Most people scoff at the idea of a package with even a single root-level menu item. Personally, I feel that until Sublime Text supports a customizable toolbar the menu is fair game. How many hundreds of keyboard shortcuts can one person reliably remember? So, today I did this for the ultimate in easy access to my xdebug controls:

2013-05-12_214214

I'm well aware that I'm abusing the mnemonic field and that display is dependent upon the system font but it works for me with Seqoe UI. Here's the config in case anyone wants it.

[
    {
        "caption": "✸",
        "mnemonic": "Toggle Breakpoint",
        "id": "root",
        "command": "xdebug_breakpoint",
        "args": {}
    },
    {
        "caption": "▷",
        "mnemonic": "Run",
        "command": "xdebug_continue",
        "args": { "state": "run" }
    },
    {
        "caption": "☐",
        "mnemonic": "Detach",
        "command": "xdebug_continue",
        "args": { "state": "detach" }
    },
    {
        "caption": "↷",
        "mnemonic": "Step Over",
        "command": "xdebug_continue",
        "args": { "state": "step_over" }
    },
    {
        "caption": "↘",
        "mnemonic": "Step Into",
        "command": "xdebug_continue",
        "args": { "state": "step_into" }
    },
    {
        "caption": "↗",
        "mnemonic": "Step Out",
        "command": "xdebug_continue",
        "args": { "state": "step_out" }
    },
    {
        "caption": "▼",
        "mnemonic": "Menu",
        "command": "xdebug",
        "args": {}
    }
]
fcgrx commented 11 years ago

dietrich-stein, i agree with you completely. however i tried your menu items and they dont work for me. they show up in the menu but when i click on them nothing happens. if i instead use the corresponding keyboard shortcuts it works fine. also i created a pulldown menu for xdebug a while back, and those still work for me so xdebug is indeed installed and configured right. i think that creating "buttons" on the menu bar doesnt work in most cases?

bashaus commented 11 years ago

@fcgrx Did you end up getting this working in your environment? I tried it in multiple environments (Windows, Mac OSX) and didn't have any issues.