The description of the Defensive Duelist feat says (PHB, p. 165):
When you are wielding a finesse weapon with which you are proficient and another creature hits you with a melee attack, you can use your reaction to add your proficiency bonus to your AC for that attack, potentially causing the attack to miss you.
Assume a spellcaster who has the Defensive Duelist feat is holding a dagger and an arcane focus. For the duration of combat, they cast spells and never make a melee weapon attack. Do they still gain the benefit of the feat?
Best Answer
Defensive Duelist has nothing to do with you making a melee weapon attack.
The criteria for "activating" Defensive Duelist are spelled out in the first sentence:
When
and
It doesn't state that you have to make a melee weapon attack, only that you are wielding the finesse weapon. So yes, you can still use the defensive duelist feat when only casting spells in combat.