Method 2 – Debugging with VSCode
For users not accustomed to command-line interfaces, VSCode offers a more convenient alternative. In essence, VSCode is based on GDB and it contains the same command format.
To successfully employ this method, you need to do the following:
- Install Visual Studio Code (https://code.visualstudio.com/Download).
- Install the C++ extension for VSCode (https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools).
- Configure
launch.json
(since LAMMPS has already been compiled, we do not requiretask.json
).
VSCode automatically generates a launch.json
with most of the required information. Before beginning the debugging process, the program
field needs to be set to the correct path. The following screenshot shows a sample configuration:
A full list of configuration controls can be found at https://code.visualstudio.com/docs...