debuggingdelphidelphi-12-athensattach-to-process

Breakpoints do not work when using Attach to Process in Delphi 12


In Delphi 12, I made a Windows service that I know is running because I can see that it is executing some queries in the database, but there are some functionalities that are not working well.

I try to do an "Attach to Process" (start Delphi as administrator) and I put breakpoints everywhere in the code. When I do "Attach", it sends me directly to a tab that says "CPU" with assembler code, and I press F9 to continue the execution, but it does not stop on any of the breakpoints. I know that it is running because I see that it continues making queries to the DB automatically.

Am I missing some configuration, or something in the code that allows me to do debugging?


Solution

  • I tried installing it from the same Debug folder of my project and running it from the services screen. Then I attached it to process and it worked perfectly.