Skip to content

GDB integration with Sublime Text 2 through WSL (bash)

License

Notifications You must be signed in to change notification settings

Vinggui/SublimeGDB

 
 

Repository files navigation

Description

GDB plugin for Sublime Text 3, running on windows 10 WSL (Windows Subsystem for Linux) - bash. (python 3).

Please observe that this is a fork from the original SublimeGDB (https://github.com/quarnster/SublimeGDB). So far, I've tested only with my project. Feel free to try.

Installation

Usually just git clone this repo to your "c:\Users\<user>\AppData\Roaming\Sublime Text 3\Packages\"

I used my SublimeGDB.sublime-settings like this:

{
  "workingdir": "C:\\"<more path...>\\<path to the executable>",
  "commandline": "bash -c \"gdb --interpreter=mi .\/<executable>\"",
  "windows_bash_compatibility": true,
  "gdb_timeout": 3,
}

Usage

In short:

  • Open up the default settings via the command palette and begin typing GDB and select the default.
  • See what options are available, and open up the User SublimeGDB preferences to tweak any values
  • If you have multiple projects, you most likely want to put project specific setting in your project file, with a prefixed "sublimegdb_". See the comments at the top of the default SublimeGDB preferences for an example.
  • If you have multiple executables in the same project, you can add a "sublimegdb_executables" setting to your project settings, and add an entry for each executable's settings.
  • 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
  • Click on the appropriate line in the GDB Callstack view to go to that stack frame
  • Click a variable in the GDB Variables view to show its children (if available)
  • Double click a variable in the GDB Variables view to modify its value
  • You can also access some commands by right clicking in any view

License

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.

About

GDB integration with Sublime Text 2 through WSL (bash)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%