0

I am using ST3 on a PHP script file.

The lower left corner indicates I have "1 error" somewhere in the script.

enter image description here

How can I locate where the error is and what it is?

Note: the "Line 612, Column 13" simply tells me where the cursor is at this moment. It is not where the error is located.

H. Ferrence
  • 7,906
  • 31
  • 98
  • 161
  • you could use some plugins to help you debug – Sirmais Dec 12 '14 at 13:07
  • Ok, nice idea @user37202. But first, why or how would ST3 know if there is an error without also being able to take you to it? Sounds like an incomplete implementation to me. Second, do you know of any plugins to do that? – H. Ferrence Dec 12 '14 at 13:09
  • see http://wasil.org/sublime-text-3-perfect-php-development-set-up conatins many useful plugins – Hmmm Dec 12 '14 at 13:11
  • 1
    it could be very wide range of errors and also depending on plugins you already use it could check for links it could use unreachable variable at some point of run time it is too wide [Github seems to have a solution](https://github.com/martomo/SublimeTextXdebug) – Sirmais Dec 12 '14 at 13:13

2 Answers2

1

refer to this question to install SL PHP lint plugin, it will tell you where the error is

Community
  • 1
  • 1
fuyi
  • 2,573
  • 4
  • 23
  • 46
  • and also http://stackoverflow.com/questions/16217157/a-sublime-text-extension-to-show-php-warnings-and-errors – Sirmais Dec 12 '14 at 13:18
1

Use SublimeLinter-php, This plugin provides an interface to php -l. It will be used with files that have the “PHP”, “HTML”, or “HTML 5” syntax.

Usage Example

enter image description here

There is also Javascript , JSON and CSS versions

Hmmm
  • 1,774
  • 2
  • 13
  • 23