I want to debug Nemo source code using VSCode.
The way we do it using command line is mentioned in https://github.com/linuxmint/nemo/issues/2309
The summery of the process is -
git clone https://github.com/linuxmint/nemo
cd nemo
sudo apt-get build-dep nemo
dpkg-buildpackage
cd .. && sudo dpkg -i *.deb
One thing we do to save time after the initial build and install using dpkg-buildpackage, is instead run: sudo ninja -C debian/build install
Currently we are using gdb to debug, & G_BREAKPOINT() to set breakpoints. However, it will be great to put breakpoints and press F5 to debug in VSCode. What might be the best possible way to achieve this?
Please let me know if you need any further information to help us with this process.
Hi. It's not Nemo but a different project that was build with Meson in mind that I'm currently working on.
To use the breakpoints in vscode I editied the task.json and launch.json files within the .vscode folder.
launch.json:
{
"configurations": [
{
"name": "Debug with Meson",
"type": "gdb",
"request": "launch",
"target": "./build/Foobar",
"cwd": "${workspaceRoot}",
"preLaunchTask": "build debug meson"
}
]
}
task.json:
{
"tasks": [
{
"label": "build debug meson",
"type": "shell",
"command": "meson build --buildtype=debug && cd build && ninja"
}
],
"version": "2.0.0"
}
Most helpful comment
Hi. It's not Nemo but a different project that was build with Meson in mind that I'm currently working on.
To use the breakpoints in vscode I editied the task.json and launch.json files within the .vscode folder.
launch.json:
task.json: