Question: In a song I am learning, there is a section of the song that has the chord progression G#m | A#m7b5 | B6
I sometimes get the fingerings wrong and use dimished 7th chords on guitar instead of m7b5 chords and in this case I actually think the dimished7th chord sounds good too. So I wanted to ask, what is the difference functionally between the two? They both seem to work in most situations as leading tone chords to a tonic chord one semitone above (B in this case).

Answer: 
In this case it's a "safe" substitution, because the pitches are within the key (`G# minor`) and have contextually appropriate functions within the key.

`A#m7b5` and `A#dim7` differ only in the presence of `G#` or `G`, respectively, both of which are present in `G# minor`. (Technically `G` is `Fx`, but the distinction isn't important in this context.) The voice-leading works nicely in either case:

```
X: 1
T: half dim vs. full dim
K: G# minor
M: none
L: 1/1
"G#min"[GBd] "A#min7b5""inverted"[GAce] "B6""inverted"[GB^df] |
"G#min"[GBd] "A#dim7""inverted"[=GAce] "B6""inverted"[^GBdf] |

```

Some points of interest:

* In both cases, there is an upward progression of triads: `G#min A#dim B`. In the `min7b5` case, the progression occurs over a `G#` pedal tone; whereas, in the `dim7` case, the `G` serves as a leading tone.
* `B6` and `Gmin7` contain exactly the same pitches, which allows for flexibility of interpretation.
* The `dim7` case allows for a descending chromatic line of `G# G F#`.

---

The `min7b5` is most common as the `ii` chord in a minor key. The `dim7` chord appears most frequently as a `vii` chord in major or minor.

The progression `G#min A#[min7b5 or dim7] B6`, allowing for the interpretation `G#min A#[min7b5 or dim7] G#min7`, can be interpreted as:

* `i ii III`
* `i vii i`
* `i vii III`  

All of which are viable according to the precepts of functional harmony.
The basic triad (which is what usually gives the main "color" to the chord) is the same, and being a diminshed fifth it creates a lots of tension towards the next one - usually a half tone above, and usually the tonic.

They *are* similar and often interchangeable. While they are not diatonic on both major and minor mode, they can "exist" in those modes:

* in minor mode, the root and seventh of m7b5 are the seventh and sixth melodic degrees ("augmented");
* in major mode, the seventh of dim7 is the harmonic ("lowered") sixth;

The lowered sixth "sounds good" in both modes because it creates a big tension that leads to the fifth, and also due to the fact that it creates another tritone with the third of the chord.

The m7b5 chord is usually considered less powerful than the dim7, as the seventh has less tension towards any resolution, but it can still create interesting effects. The choice depends on the composer/arranger/performer, but it obviously should not collide with any other voice (the melody) and should consider the overall harmony and current harmonic progression.