How to configure sublimegdb
SublimeGDB 的配置
如何在 Sublime Text 中配置 SublimeGDB?
配置 SublimeGDB 涉及以下步骤:
1. 安装 SublimeGDB 包
- 打开 Sublime Text 的包管理器(Ctrl+Shift+P)。
- 搜索并安装 SublimeGDB。
2. 安装 GNU 调试器 (GDB)
- 确保已在系统中安装了 GDB。
- Windows:下载 MinGW 或 Cygwin 并安装 GDB。
- macOS:通过 Homebrew(
brew install gdb)或 MacPorts(sudo port install gdb)安装 GDB。 - Linux:通过包管理器(如
sudo apt-get installgdb)安装 GDB。
3. 配置 SublimeGDB 设置
- 打开 Sublime Text 的设置文件(Ctrl+,)。
- 添加以下内容:
<code>"sublimegdb": {
"gdb_path": "/path/to/gdb"
}</code>
- 将
gdb_path替换为 GDB 的安装路径。
4. 配置构建系统
- 创建或打开项目文件夹,然后右键单击并选择“构建系统”->“新建构建系统”。
- 粘贴以下内容:
<code>{
"cmd": ["gdb", "-q", "$file"],
"file_regex": "^(.*):(\\d+):(\\d+)$",
"selector": "source.c, source.cpp"
}</code>
- 将
$file替换为调试器命令的正确占位符(通常为%f)。 - 将
file_regex替换为与调试输出匹配的正则表达式。
5. 设置断点
- 打开要调试的文件并转到要设置断点的行。
- 右键单击行号并选择“Toggle Breakpoint”。
6. 启动调试会话
- 按 F5(Windows/Linux)或 Cmd+F5(macOS)启动调试会话。
The above is the detailed content of How to configure sublimegdb. For more information, please follow other related articles on the PHP Chinese website!
Hot AI Tools
Undress AI Tool
Undress images for free
Undresser.AI Undress
AI-powered app for creating realistic nude photos
AI Clothes Remover
Online AI tool for removing clothes from photos.
Clothoff.io
AI clothes remover
Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!
Hot Article
Hot Tools
Notepad++7.3.1
Easy-to-use and free code editor
SublimeText3 Chinese version
Chinese version, very easy to use
Zend Studio 13.0.1
Powerful PHP integrated development environment
Dreamweaver CS6
Visual web development tools
SublimeText3 Mac version
God-level code editing software (SublimeText3)
How to call up the laptop without sound? Steps to restore the soundlessness of Apple laptop with one click
Aug 14, 2025 pm 06:48 PM
Laptop silent? Easy troubleshooting and solving! Laptops are a must-have tool for daily work and study, but sometimes they encounter silent troubles. This article will analyze in detail the common causes and solutions for laptop silence. Method 1: Check the volume and audio equipment connection First, check whether the system volume setting is normal. Step 1: Click the taskbar volume icon to confirm that the volume slider is not muted and the volume is appropriate. Step 2: In the volume control panel, check the "Main Volume" and "Microphone" volume settings to ensure that the volume of all applications has been adjusted correctly. Step 3: If you are using headphones or external speakers, please check that the device is correctly connected and turned on. Method 2: Update or reset audio that is outdated or damaged by the audio driver
Linux how to enable and disable services at boot
Aug 08, 2025 am 10:23 AM
To manage the startup of Linux services, use the systemctl command. 1. Check the service status: systemctlstatus can check whether the service is running, enabled or disabled. 2. Enable the service startup: sudosystemctlenable, such as sudosystemctlenablenginx. If it is started at the same time, use sudosystemctlenable--nownginx. 3. Disable the service startup: sudosystemctldisable, such as sudosystemctldisablecups. If it is stopped at the same time, use sudosystemctldisabl
Linux how to list all running processes
Aug 08, 2025 am 06:42 AM
Usepsauxforacompletesnapshotofallrunningprocesses,showingdetailedinformationlikeUSER,PID,CPU,andmemoryusage.2.Usetoporhtopforreal-timemonitoringofprocesseswithdynamicupdates,wherehtopoffersamoreintuitiveinterface.3.UsepgreporpidoftoquicklyfindthePIDs
How to clean up your Linux system
Aug 22, 2025 am 07:42 AM
Removeunusedpackagesanddependencieswithsudoaptautoremove,cleanpackagecacheusingsudoaptcleanorautoclean,andremoveoldkernelsviasudoaptautoremove--purge.2.Clearsystemlogswithsudojournalctl--vacuum-time=7d,deletearchivedlogsin/var/log,andempty/tmpand/var
Linux how to view the contents of a file
Aug 19, 2025 pm 06:44 PM
ToviewfilecontentsinLinux,usedifferentcommandsbasedonyourneeds:1.Forsmallfiles,usecattodisplaytheentirecontentatonce,withcat-ntoshowlinenumbers.2.Forlargefiles,uselesstoscrollpagebypageorlinebyline,searchwith/search_term,andquitwithq.3.Usemoreforbasi
how to create an alias in linux
Aug 19, 2025 pm 08:13 PM
The steps to set up alias in Linux are as follows: 1. Temporarily set the use of the alias command such as aliasll='ls-la'; 2. Permanently set the shell configuration file, such as ~/.bashrc, and then execute the source to take effect; 3. Be careful to avoid overwriting the original command and the different shell configurations are independent. Alias can simplify complex commands and improve efficiency, but only after the current shell environment takes effect and closes the terminal, it needs to be reasonably defined and regularly checked for configuration.
192.168.10.1 login portal (Period routing/Asus management page)
Aug 12, 2025 pm 10:18 PM
First, confirm that the device is connected to the Wi-Fi of the target router or connected through a network cable; 2. Enter http://192.168.10.1 in the browser address bar and press Enter; 3. Enter the correct username and password (default is often admin/admin or view the back of the router); 4. If it cannot be opened, check whether it is connected to the wrong network, confirm the correct IP address (you can view the default gateway through ipconfig), restart the router, change the browser or turn off the firewall; 5. After logging in, you can modify the Wi-Fi name password, set security options, configure port forwarding, enable guest network, upgrade firmware, etc.; 6. If you forget your password, you can reset the factory settings by pressing and holding the router reset hole for 5-10 seconds, but all configurations will be cleared.
Linux how to list installed packages
Aug 15, 2025 pm 12:58 PM
ForDebian/Ubuntu,usedpkg-loraptlist--installedtolistinstalledpackages.2.ForRedHat/CentOS/Fedora,userpm-qaordnflistinstalled.3.ForopenSUSE,usezyppersearch--installed-onlyorrpm-qa.4.ForArchLinux,usepacman-Q,withpacman-Qeforexplicitlyinstalledpackages.A


