Worst case, you'd could do:
#If Debug Then
<MyAttribute()>
Private Function MyFunction() As Boolean
#Else
Private Function MyFunction() As Boolean
#End If
This is probably due to the line continuation processing occurring before the pre-processing. For example, this is valid:
#If 1 = _
1 Then
#End If
In your case, you are expecting the line continuation to occur after pre-processing.