DEV Community

Cover image for How to add a custom XDebug Client menu to Sublime Text (on Mac)
Aubrey Portwood
Aubrey Portwood

Posted on • Edited on

How to add a custom XDebug Client menu to Sublime Text (on Mac)

Image description

Note, this works with this package: XDebug Client

Edit your Application Support/Sublime Text/Packages/User/Main.sublime-menu file and add the following to it:

[
    {
        "caption": "XDebug",
        "mnemonic": "X",
        "id": "xDebug",
        "children":
        [
            {
                "caption": "Continue",
                "command": "xdebug_continue"
            },
            {
                "caption": "Evaluate",
                "command": "xdebug_evaluate"
            },
            {
                "caption": "Restart",
                "command": "xdebug_session_restart"
            },
            {
                "caption": "Stop",
                "command": "xdebug_session_stop"
            },
            {
                "caption": "Toggle Breakpoint",
                "command": "xdebug_breakpoint"
            },
            {
                "caption": "Clear All Breakpoints",
                "command": "xdebug_clear_all_breakpoints"
            },
            {
                "caption": "Start",
                "command": "xdebug_session_start"
            }
        ]
    }
]
Enter fullscreen mode Exit fullscreen mode

Now, at first all the menu items won't show, but that's because you haven't started a debugging session. Just add a breakpoint and start a session to see all the other menu items.

I wish SublimeText had a API for adding buttons for these, but I think this is as good as it's going to get!

See my configuration, as it may have been changed or improved.

Happy debugging!

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more