Цитата:
There is another way to achieve the same result. You can also insert a no-op line, like i=i; and set a normal breakpoint on that line using F9. This approach has the benefit that only the user setting the breakpoint will hit it – but at the risk of leaving some “silly looking code” behind. In contrast the breakpoint statement triggers a best practice error – so they are easy to clean out again.
Наверное самое значительное отличие ключевого слова breakpoint от F9 это то что F9 действует локально у разработчика, поставившего эту точку останова, а ключевое слово breakpoint у всех пользователей. Если у пользователя не установлен дебагер, то произойдет ошибка.
Ещё стоит отметить один недостаток ключевого слова breakpoint перед F9. Его нельзя снять в момент отладки.
Цитата:
Bonus trick
There is another usage of the breakpoint statement. Sometimes regular breakpoints in forms don’t fire – here the breakpoint statement also comes in handy. Instead of setting a breakpoint using F9 – just type “breakpoint;” in the code. This will trigger the debugger.
По опыту, там где не работает F9 (в методах контрола формы например), то и ключевое слово breakpoint там не сработает. В таких случаях помогает
kamalblogs: Debugging form controls in Dynamics Ax