How to Do Interactive Debugging

One of the wonders of the modern (software development) world is that if you are willing and moderately competent at using the command line, you can help the development of Ardour by doing interactive debugging with a programmer.

What does this mean precisely? Lets say you have run into an issue with the program but that developers cannot reproduce the issue themselves (this happens a lot more than you might expect). Rather than throw all of our hands in the air, we can instead get together on IRC and in realtime go about debugging the issue. The process looks roughly like this:

  • You get the source from our development repository
  • You build Ardour from the source (this can be tricky, and slow)
  • You and the developer switch to working in a "private" debugging branch
  • The developer makes some changes, you test them out, possibly providing output of the program back to the developer via a "paste site" such as pastebin.com
  • You both repeat the problem until the developer has all the information required or, sometimes, till the bug is fixed
  • You revert back to the main branch of the source

Specifics

The developer first creates a new branch to work on your bug, which we'll call "frobnication". Then she pushes it to git.ardour.org so that the tester can access it:

git checkout -b frobnication
git push -u origin frobnication
        

The tester first clones the ardour source

git clone git://git.ardour.org/
        
If they already have a working copy, they update it:
git pull
        
Then they switch to the new debugging branch:
git checkout -b frobnication origin/frobnication
        

At this point, both parties are ready to start the process. The developer will make some changes and then push them to git.ardour.org:

... hack ...
... hack ...
git commit -m"message"
git push
        

The tester will now update:

git pull
        
and then rebuild Ardour and run it without installing:
./waf
cd gtk2_ardour
./ardev
        

The two parties will repeat these steps one or more times until the developer feels she is done. At this point several things could happen.

If the bug was fixed

If the bug is fixed, the developer will merge changes back into the master branch, and delete the debugging branch:

git rebase master
git checkout master
git merge --squash frobnication
git commit -m"message"
git push
git branch -D frobnication
git push origin :frobnication
            
and then the tester will switch back to the master branch, update it with the changes, then delete their local version of the debug branch
git checkout master
git pull
git branch -D frobnication
            

If the bug is not fixed but work will continue

The developer will leave the branch in place. Both the tester and developer may switch back to the master branch now:

git checkout master
          
and then later return to the debug one:
git checkout frobnication
          
Later, they will (hopefully) go through the steps described above for the case where the bug is fixed.

If there are no changes to be made

Sometimes this kind of debugging just generates information for a developer, and there are no changes. In this case, both parties will just switch back to the master branch and delete their local versions of the debug branch. The developer does:

git checkout master
git branch -D frobnication
git push origin :frobnication
          
The tester does:
git checkout master
git branch -D frobnication