-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP IntelliSense extension - unable to edit files after selecting 'Go To Definition' #24506
Comments
If you open the same file a different way, like through the file explorer, does this happen? |
The workaround I have is to find the file in the explorer bar and open it. |
@GeorgeWells can you help check the debugger console to see if there is any error there when it happens? Help -> Toggle Developer Tools. |
I'll have a look the next time it happens and let you know the results of the console. I'm trying to see if I can replicate this issue again and again but may have come across a separate issue. If you switch git branch after the PHP Language Server parses (should it be parsing twice?) and this branch contains a new file with a class and another new file calling in the class and calling functions to it, you can't 'Go To Definition' on the functions to the class; it comes up with 'No definition found for xxx'. I'm guessing it's because it hasn't been parsed. After you've manually opened the file and closed it, it works. |
I've cleared out the console and 'Go To Definition' on the function, it's opening the file in a read-only state but no errors are appearing in the console |
Yeah it looks like those errors are coming from emmet, and it has some issue with the grammar. |
cc @ramya-rao-a |
Can you do a SHA-1 checksum of that file? It should be When it is different to mine, try reinstalling the extension, then you might have corrupt data. |
SHA-1 checksum comes out exactly the same: F56B3864595701CD5C87AFE5248003247FEEFD9E |
Err, that's not the same checksum? |
Reinstalled and got the same SHA-1 checksum as before: F56B3864595701CD5C87AFE5248003247FEEFD9E |
Can you attach your file? It's really weird... |
Had to zip it in order to upload it: |
Seems valid... I don't know... PHP binaries are fine? |
I think that should be fine. Sorry, but I don't know what happens there... 😭 |
That error in PhpTokenizer is ok, it means that the tokenizer read a file with an unterminated comment, not that the file itself has an unterminated comment. |
Oh really? That musn't be true... Oh my gosh. Sorry. :/ |
I want to try to provide as much info as I can with this issue.
I'm guessing a potential fix to this could be to parse any new file that appears in the folder/repository i.e. when a git branch changes. As always, if anyone wants me to check something or report anything then let me know. |
Thanks for the details, it seems most likely that the language server is doing something unexpected here. I'm not sure where to go from here, but I don't have evidence of a vscode bug. |
Steps to Reproduce:
This also happens if you select 'Peek Definition' and double click in the output to open the file.
The text was updated successfully, but these errors were encountered: