| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
(last updated: 2012/07/11)
This is a plugin that allows users to debug programs in Sublime Text 2 using lldb. This plugin enabled command-line interaction with the lldb debugger, as well as Sublime Text 2 integration.
To report a bug or feature request please use GitHub's project issues page.
All features are available on menus and/or Sublime Text's command pallette.
Command-line interface to the lldb tool
Start an lldb session with a predefined program, architecture, arguments, breakpoints, and lldb command prologue
Attach to a program, and waiting for a program to start before an attach
Connect to a running lldb debugserver
Step over, into, and out of source lines/functions. Stepping a single thread.
Send signals to the debugged process
Set and toggle enabled state on breakpoints
Process memory view
Thread disassembly view
Register view
View loaded shared libraries
Breakpoint and program counter markings on the source file buffer
Execute any lldb command
Xcode keybindings
VS keybindings will be added on request. Please open a bug report with the equivalent keybindings in Visual Studio (Check the Xcode keybindings in the Useful Keybound Commands section)
Event-driven to avoid any editing slow-downs due to the plugin.
Lazy loading architecture so you won't notice the lldb is loaded until you call one of its commands.
Access plugin functionality using the menu items in Tools->LLDB or quickly access commands using Sublime Text 2's Command Pallette (all commands start with “LLDB: ”). All commands mentioned in this document are avilable in Sublime Text 2. To use, e.g. LldbDebugProgram with their lower-cased, underscore-separated names, e.g. lldb_debug_program.
The main points of entry for the plugin are:
super+shift+l: (LldbCommand) Open lldb prompt (maybe starting lldb)
super+shift+k: (LldbToggleOutputView) Show/hide the lldb i/o view
super+shift+alt+k: (LldbClearOutputView) Clear the lldb i/o view
Xcode-like commands (Mac OS X):
super+ctrl+y: (LldbContinue) Continue executing the program
F6: (LldbStepOver) Step over
F7: (LldbStepInto) Step into
F8: (LldbStepOut) Step out
ctrl+F6: (LldbStepOverInstruction) Step over instruction
ctrl+shift+F6: (LldbStepOverThread) Step over thread
ctrl+F7: (LldbStepIntoInstruction) Step into instruction
ctrl+shift+F7: (LldbStepIntoThread) Step into thread
super+shift+m: (LldbViewMemory) View process memory
Several settings are available to a Sublime Text 2 project, to allow it to specify a default executable, as well as command line arguments, architecture, and breakpoints to set.
Each default program breakpoint may be represented in several ways:
The LLDB plugin has several settings to change its behaviour. they are listed next, along with their default values and an explanation of what they change in the plugin.
No verifications are made on the chosen sizes. For best results, size should be a multiple of width, which should be a multiple of grouping.
lldb.markers.current_line.region_name ("lldb.location"): Region name for current source line markers
lldb.markers.current_line.scope ("bookmark"): Scope for current source line markers
lldb.markers.current_line.scope.crashed ("invalid"): Scope for current source line markerswhen the program crashes
lldb.markers.current_line.type ("bookmark"): Type for current source line markers
lldb.markers.breakpoint.enabled.region_name ("lldb.breakpoint.enabled"): Region name for enabled breakpoints
lldb.markers.breakpoint.enabled.scope ("string"): Scope for enabled breakpoints
lldb.markers.breakpoint.enabled.type ("circle"): Type for enabled breakpoints
lldb.markers.breakpoint.disabled.region_name ("lldb.breakpoint.disabled"): Region name for disabled breakpoints
lldb.markers.breakpoint.disabled.scope ("bookmark"): Scope for disabled breakpoints
lldb.markers.breakpoint.disabled.type ("circle"): Type for disabled breakpoints
LldbStopDebugging: Stops the inferior debug loop, killing (or detaching) the program being debugged
LldbSendSignal: Asks the user for a signal number and sends that signal to the inferior program
LldbListBreakpoints: Lists all defined breakpoints, in a format suitable for the lldb.breakpoints setting for a default program
LldbBreakAt{Line,Symbol}: Breaks at the current line or symbol (Currently LldbBreakAtSymbol is not defined)
LldbToggleEnableBreakpoints: For the first call disables every enabled breakpoint. The next time, it will enable every breakpoint it disabled.
LldbViewSharedLibraries: Opens a view with a list of the loaded shared libraries
LldbRegisterView: Opens a view with the current values for the machine registers in the current thread
LldbDisassembleFrame: Opens a view with the disassembly of the current frame
The default debugserver binary that is used is the system one (when XCode or the command line tools are installed). If the bundled debugserver is to be used (e.g: newer debugserver with protocol enhancements), change the setting lldb.use_bundled_debugserver, in your settings True and sign the <plugin folder>/lldb_plugin/LLDB.framework/Resources/debugserver binary as instructed in the docs/code-signing.txt file in lldb's sources.
If, for some reason, you want some debug messages from the plugin, call, on plugin initialization, the debug.set_debug function, with some of the constants defined at the start of the plugin/debug.py file as argument (you can combine several constants with |).
| Back | FazBrowse Home | New Git URL |