GDB plugin for Sublime Text 2. Filing issues are not welcome (and thus disabled). Pull requests please.
- The easiest way to install SublimeGDB is via the excellent Package Control Plugin
- See http://wbond.net/sublime_packages/package_control/installation
- Once package control has been installed, bring up the command palette (cmd+shift+P or ctrl+shift+P)
- Type Install and select "Package Control: Install Package"
- Select SublimeGDB from the list. Package Control will keep it automatically updated for you
- If you don't want to use package control, you can manually install it
- Go to your packages directory and type:
- git clone https://github.com/quarnster/SublimeGDB SublimeGDB
- Go to your packages directory and type:
- See http://wbond.net/sublime_packages/package_control/installation
- Back in the editor, open up the command palette by pressing cmd+shift+P or ctrl+shift+P
- Type SublimeGDB and open up the settings file you want to modify
See the default key bindings and the default mouse map.
The GDB plugin is pre-configured for the simplest scenario, where your code contains only one C/C++ file, and is built to a binary with the same filename, e.g. compiling "main.cpp" to "main".
For any other scenario, you need to specify where the generated binary is with the "commandline" option in the configuration file.
Once you're all configured, you can:
- Toggle breakpoints with F9 (OSX Users might want to change the key binding, or disable the "Exposé and Spaces" key bindings in the System Preferences)
- Launch with F5
- Step over with F10
- Step into with F11
- Step out with Shift+F11
- Continue execution with F5
During debugging, you can also:
- In the GDB Callstack view, click on the appropriate line to go to that stack frame
- In the GDB Variables view, click a variable to show its children (if available), or double click to modify its value
- In any GDB view, right clicking to access some commands from the context menu
- /.config/sublime-text-3/Packages/SublimeGDB/SublimeGDB.sublime-settings
- /.config/sublime-text-3/Packages/User/SublimeGDB.sublime-settings
- <YourProject>.sublime-project. Note: options in this file need be prefixed with "sublimegdb_"
This plugin is using the zlib license
Copyright (c) 2012 Fredrik Ehnbom This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution.