Autocompletion not working in unreachable code

Whenever I debug my scripts and happen to exit to die() the script in the middle of the file to debug some variables etc. PhpStorm doesn't provide any autocompletion after the mentioned exit or die() function.

How can I make autocompletion work in unreachable code?

As an overly simplified example:

0
3 comments

Hi there,

Currently no way... except commenting out the exit/halt instructions.

It's an optimisation from IDE side (code is not fully analysed after exit sort of statements (so the code that follows it is treated as dead/never-reached code) hence no completion).

I believe there is a ticket for this .. but I could not find it right now...

1

Found: https://youtrack.jetbrains.com/issue/WI-18068 -- watch it (star/vote/comment) to get notified on any progress.

0
Avatar
Permanently deleted user

Thank You, Andriy, for the info and the link! :)

Will check on that ticket.

0

Please sign in to leave a comment.