Log to console / error window?
If you have devMode enabled, then you have access to Twig's dump method that lets you inspect variables.

{{ dump(article_id) }}


Or, if you're feeling more adventurous, there is a debugging library called Kint that there is a Craft plugin for to help debug templates.