Cannot add breakpoint to *.pas file in VS2017

we’ve run into a problem where we aren’t able to add breakpoints to our *.pas files in VS2017. It was possible to add it before we installed the Water Extension to VS, now it’s not possible. Unfortunatelly we don’t even get any notice on why it is not possible.

I’m pressing F9 and nothing happens.

Thank you in advance,

Does anyone know?

Thanks, logged as bugs://82171

Hello David!
Could you give more details, please.

Do you fail to set BP in Oxygene files? Which platform? And if you create simple application from template are you able to set BP there?

Do you mean you installed Water IDE ? Is it possible to set BPs in your application in Water?

FWIW, Water should have absolutely no effect in Visual Studio, or vice versa…

Ok, here is our test file. In this file you can notice two commented sections. If you uncomment the line of code in first section, breakpoints can be normally added. But if you leave uncommented only the code in the second section, breakpoints can no longer be added.

Class1.pas (698 Bytes)

As I could see, if you uncomment second part then Register class will not be available. But methods are implemented for Register class. That is why you can’t set breakpoints there.
Also I can’t compile your file in any case. If you have problems with setting breakpoints in successfully compiled project, please, provide us with the testcase.

Yes, of course. Here is our buildable solution: (16.4 KB)

In this solution we are able to set breakpoints in the file “Class1.cs” in both cases. But if we open the file “Class1.cs” on it’s own (not as a part of the solution) then there is a problem and we can set BPs only when line

Registrator = public class

is uncommented. When we uncomment this line

{$IFNDEF CLR}CTimerClass{$ELSE}Registrator{$ENDIF} = {$IFDEF CLR} public {$ENDIF} class

and the previous line of code we comment out. Then the BPs can be no longer set.

bugs://82171 got closed with status fixed.