Search code examples
javascriptsublimetext2sublimetextsublimetext3developer-tools

Sublime text plugin that displays the values of a selected variable?


I'm hoping to get some guidance of a Sublime Text plugin that can show me the current value of a variable.

For instance, the WebStorm IDE has a nifty feature where you are able to see value of a variable based on where you selected it in the code?

See the "Debugging, Tracing, & Testing" tab on the front page of the WebStorm site for an example: https://www.jetbrains.com/webstorm/

Any idea if there is plugin that does this, or is there a native feature in Sublime Text that I am not aware of?


Solution

  • I haven't used it personally, but the Web Inspector plugin looks promising. It's essentially a JS version of XDebug (for PHP), and allows you to debug code using ST2/ST3 and Chrome. Its features include:

    • Breakpoints for project stored in user settings with absolute paths.
    • Console.
    • Debugger steps and breakpoints.
    • Stack trace.
    • You can see object properties and values in console and stack trace.

    so it looks like it can do what you're looking for.

    Good luck!