We have a Windows Service that runs as Local System. Luckily, I can run it as a normal console application. The application won't execute if we start it as a Current User because it tries to access some certificates that are installed as Local System. So, in order to debug the process, I had to start Visual Studio as Local System with the following command -
psexec.exe -i -s <Visual Studio Path>
And I was able to attach to the process without any issues. But the problem happens when I try to debug it. Once, it hits a breakpoint, I get the Edit and Continue
popup with the below message -
Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed. Refer to the Error List Window for further details.
But no edits were made to the code, and I didn't find any errors in the Error List Window.
Some Stack Overflow posts suggested disabling the Edit and Continue option in the Visual Studio settings. That seems to be a good workaround, but I would like to know if there are some other good solution to fix this.
Thanks in advance :)