Currently I'm working on manually moving several hundred code files from C# to PHP (I'm currently at having already moved around 400 files as of writing this, still many more to come).
I do it file by file, i.e. copy the content of one file from C# to PHP, change the syntax, fix all the errors, etc.
What I discovered is that PHP Tools is rather unreliable in detecting and visualizing errors:
Right after pasting the C# and working on the file, nothing in terms of errors is visualized at all. I can only deduce that there are errors, because the syntax-color is broken (mainly my own class names are not colored).
I then fix everything and still get no visual cues like underlines in red/green.
When then closing and reopening the file, the red/green underlines appear and also the small red/green squares in the scroll bar. As soon as I change anything in my code, the small red/green squares disappear instantly again.
Right now, not even this works reliable:
As you can see in the screenshot, the the small red/green squares in the scroll bar appear, but nothing is underlined in the source window. Only the code preview (or how it is called) when hovering the small red/green squares in the scroll bar shows the red/green underlines.
I will now try to restart VS and hope this goes away, but generally spoken, this is rather annoying to me. (As of writing this, the VS instance consumes approx. 6,5 GB of my 32 GB RAM).
Unfortunately a restart of VS did not help, the red/green underlines still do not appear anymore. I've checked other PHP files, too. (VS currently consumes approx. 1 GB of RAM).
Seems I've destroyed the error checking in my whole project 😭.
I've just discovered that even when the red/green underlines disappear, the error/warning tool tips are still present:
Maybe this helps in finding the cause of the erroneous behavior?
Maybe there is an option somewhere hidden so that I can clear all internal caches of PHP Tools (in case there are any) to temporarily fix the behavior?