GDB on VS-Code with Lima #1433
-
Hello everyone, my university requires the use of GDB as a debugger for C++. However, I am unable to install it on my MacBook M1, either natively or through emulation. As a workaround, I have installed Lima and installed GDB on the virtual machine. Does anyone know how to configure VS-Code to integrate Lima and GDB? Thank you. Please let me know if you have any further requirements. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
I think you would use something like https://code.visualstudio.com/docs/cpp/pipe-transport, to do remote debugging... Assuming that you have already configured the compiler, so that it would either run with It could be useful to have a whole example for Lima, like WSL: https://code.visualstudio.com/docs/remote/remote-overview You can set up ssh config to the Lima VM, using Then VS Code will install the VS Code Server, on the lima instance. |
Beta Was this translation helpful? Give feedback.
-
If you don't want to install everything on the VM, you can use Dev Containers: https://code.visualstudio.com/docs/devcontainers/containers But it requires that you use https://code.visualstudio.com/remote/advancedcontainers/docker-options * There is an open feature request, to make it (nerdctl) available as an option: |
Beta Was this translation helpful? Give feedback.
I think you would use something like https://code.visualstudio.com/docs/cpp/pipe-transport, to do remote debugging...
Assuming that you have already configured the compiler, so that it would either run with
lima
or cross-compile to Linux ?It could be useful to have a whole example for Lima, like WSL:
https://code.visualstudio.com/docs/remote/remote-overview
You can set up ssh config to the Lima VM, using
limactl show-ssh
Then VS Code will install the VS Code Server, on the lima instance.