Visual code tracking and debugging and its software installation, testing and basic use

Visual debugging of front-end software testing based on gcc and gdb in the back-end

1. Visual front-end Kdbg

Kdbg installation

Installation process reference blog

:https://blog.csdn.net/weixin_43820951/article/details/108817882

Based on the above blog, there are several points to note:
Note 1: Pay attention to the directory where the command is entered during the installation of kdbg. After downloading the kdbg, the kdbg file will be generated in the home directory, and you must cd in to execute the installation command cmake.
The problem that may occur after cmake is as follows:
Insert picture description here
After that, the problem is handled according to the reference blog.
Note 2: After downloading the QT installation package, the installation package will be in the downloads folder. At this time, double-clicking the file cannot be installed. First, enter the chmod +x qt-opensource-linux-x64-5.9.0.runcommand in the terminal cd into the downloads file to obtain the installation permission, and then double-click the file to install QT.
Insert picture description here
Note 3: When installing the kf5 library, you must return to the home directory (command: cd ~) before entering the series of commands and enter the installation, otherwise cmake will not succeed.
After cmake is successful, basically the last two commands can be executed smoothly.
After the installation is successful, directly call the kdbg command to use kdbg normally.
Insert picture description here

Kdbg visual code debugging test

That is, you can set breakpoints in the graphical interface, enter test data, and track and debug the code
Insert picture description here

Insert picture description here

2. Visual front-end VScode

VScode installation

Directly search for Visual Studio Code in the Ubuntu software store and click to download
Insert picture description here

VScode visual code debugging test

1. Download the plug-in that supports c/c++ at the prompt, or search for plug-in download by ctrl+p.
Insert picture description here
2. Use VScode to visually
debug the program 1. Add a debugging program:
Insert picture description here
2. Select a file for debugging (the fifth icon is where the debugging function is located)
Insert picture description here
3. After selecting the pop-up debugging method (gdb), select gcc to compile, and the system will automatically generate a suffix After the file is json, click the green arrow to complete the debugging, and display the result and prompt information on the terminal.
Insert picture description here

Guess you like

Origin blog.csdn.net/rude_dragon/article/details/109555873