Debugging go programs with SUBLIMEGDB

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

Hello everyone, long time no with the new blog, today to bring you a sublime Text 2 plug-in sublimegdb use of the tutorial.

Earlier, wrote an article about sublime Text 2 configuration Go Language development environment, if you have not seen, you can first look at this article, address: http://golanger.cn/?p=32, also wrote about Go using the GDB breakpoint debugging article, We can also look at the address: http://golanger.cn/?p=91.

Next we look at the installation and use of SUBLIMEGDB:

One, install the SUBLIMEGDB plugin: Open the Preferences menu, under the Package Control menu, and select the Install package option, such as:

Enter Sublimegdb, and select Install, after a period of time, SUBLIMEGDB will be installed successfully, restart Sublime Text 2, in the Preferences menu of the Package Settings menu will be more than a sublimegdb option, Such as:

Two, configure: Open option, Settings–default appears, such as:

Modify Workingdir to the directory where the project is located, modify executable as the executable file name in commandline, such as:

Third, debug the test code, write test examples, such as:

On the line where the cursor is located, pressing F9 will insert a breakpoint, such as:

Next, press F5, which will appear, the debugging interface, the following several windows:

These several windows, the label writes very clearly, I did not introduce each.

Finally, the shortcut keys for this plugin are used as follows:

Plugin Address: Https://github.com/quarnster/SublimeGDB

2012-11-19 22:36 add: How to close the Debug window. Such as:

You can view this post in detail
http://www.sublimetext.com/forum/viewtopic.php?f=5&t=4819#p21670

2013-01-10 23:13 Add: Add command line parameters to the debug environment, as follows:

Note:you must provide–interpreter=mi for the plugin to work
"CommandLine": "Gdb–interpreter=mi–args/revel run Github.com/yourihua/console",

Detailed Address: HTTPS://GITHUB.COM/QUARNSTER/SUBLIMEGDB/ISSUES/39

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.