Debugging Rust in Visual Studio Code

So you have written your first Rust program that is more complicated than Hello World, you are using Visual Studio Code (of course you are because it is awesome!), and you want to debug it in the IDE. Well here is what to do:

  1. Enter the Debug Tab and click “Add Configuration“, from the drop down next to the green play button. Select LLDB – Customer Launch. You should end up with a launch.json file in your workspace.
  2. Open this file and copy the text below:
    “version”: “0.2.0”,
    “configurations”: [
            “name”: “(Linux) Launch”,
            “type”: “lldb”,
            “request”: “launch”,
            “program”: “${workspaceRoot}/target/debug/binary_search”,
            “args”: [],
            “cwd”: “${workspaceRoot}”,
Change ‘binary_search’ to the name of your executable
You should end up with something like this:
3. Now you need to make sure breakpoints are on. You do thias by first going to File -> Preferences -> Settings, and in search enter ‘break’. Then make sure ‘Allow Breakpoints Everywhere’ is ticked, see below:
4. Next you need to make sure it picks up the latest LLDB executable, and stop the error: ‘process launch failed: unable to locate lldb-server-x.x.x’. To do this, in settings, search for ‘lldb’ and make sure ‘Executable’ just has the word ‘lldb’, remove any version number etc, see below:
And that is it!
You can find this project here with the vscode settings:
Insert a breakpoint using F9 and, press F5 to debug! Have fun!

GNOME Maintainer

In August I agreed to help the GNOME foundation by becoming a maintainer for one of their projects, the game quadrapassel. I have been programming for 25 years, but have done very little in open source so thought this was a great place to roll up my sleeves and jump into the GNOME project. I would like to say a huge thank you to the GNOME community so far for being so welcoming.

Quadrapassel is a game that is a clone of the famous game Tetris, and it can be downloaded via your distributions favourite package manager.

The latest release is 3.34.0 can be found here