Lately we run into following problem. Doing different action in Dynamics AX client we got Dynamics AX 2009 Debugger pop up and following error:

Error executing code: Wrong argument type for function.

The problem was caused that application and Client was running on different build version.
Client was AX 2009 RTM ( and application on 2009 SP1 (5.0.1000.52)