puphpet/puphpet

View on GitHub
src/PuphpetBundle/Resources/views/xdebug.html.twig

Summary

Maintainability
Test Coverage
<div class="help-block">
    <p>Not using Xdebug? Still pounding out <code>var_dump()</code> and
        <code>print_r()</code> and <code>echo</code>?</p>
    <p><a href="https://jtreminio.com/2012/07/xdebug-and-you-why-you-should-be-using-a-real-debugger"
          target="_blank">Xdebug and You: Why You Should be Using a Real Debugger</a></p>
    <p>CLI debugging will be automatically available. Simply run <code>$ xdebug foo.php</code>!</p>
    <p><a href="https://www.jetbrains.com/help/phpstorm/10.0/configuring-xdebug.html"
          target="_blank">Follow instructions here to setup PHPStorm to listen for a CLI connection</a>.
        Other IDEs should be similar.</p>
</div>

<div class="clearfix"></div>

<div class="form-group col-xs-12">
    <label for="xdebug-settings-displayer">
        Settings
    </label>
    <select id="xdebug-settings-displayer"
            multiple class="form-control select-tags-user-input"
            data-target-container="xdebug-settings"
            data-target-name="xdebug[settings]">
        {% for name, value in xdebug.settings %}
            <option value="{{ name }}" selected>{{ name }}</option>
        {% endfor %}

        {% for setting in xdebug.available.settings %}
            {% if setting not in xdebug.settings|keys %}
                <option value="{{ setting }}">{{ setting }}</option>
            {% endif %}
        {% endfor %}
    </select>

    <div id="xdebug-settings" class="hidden">
        {% for name, value in xdebug.settings %}
            <input type="hidden" name="xdebug[settings][{{ name }}]"
                   data-option-name="{{ name }}" value="{{ value }}" />
        {% endfor %}
    </div>

    <div class="help-block">
        Choose the one closest to you, or your target audience!
    </div>
</div>