Instead it performs a "step-into".
It is caused by a single message, WM_Enable !
When under the message actions of a top-level window the WM_Enable event is coded, whatever implementation, the debugger will fail to do "step-over".
By commenting the code (and keep the WM_Enable message present, but without actions) the debugger works like it should.
I created a very simple testcase (see attachment)
Steps to reproduce :
- Place a breakpoint at the first line of the SAM_Click of the pushbutton on the form.
- Run application and try to "step-over" the code. It will fail, you get a "step-into"
Now to see how WM_Enable is related:
- Go to the message actions of the form and locate WM_Enable
- Comment the line of code under the message
Code: Select all
If TRUE ! Just comment this line to get the debugger working again
I have tested this on TD1.5.1, TD3.1 and TD4.2 and have seen the issue is present in all those versions.
Testing TD5.1 and TD5.2 shows the issue is not present there, seems the internal handling of WM_Enable has changed.
I tried to subclass the WM_Enable message (by using subclasser) by sending another custom message, but that fails also.
Also eating the message completely and resend it as another custom one does not help. Even sending it to a completely different window does not solve it.
Seems WM_Enable is internally processed by TD and interferes with the debugger.
Can anyone confirm this issue ?
Furthermore, does anyone have a solution? We need WM_Enable on top level forms, but right now the debugging is very inefficient.