diff --git a/src/VivyApplication.cc b/src/VivyApplication.cc
index 13d96df92595491688bc5e6df2c1588dbf7768b9..945090953c13ba23011a62257606211dad5c8332 100644
--- a/src/VivyApplication.cc
+++ b/src/VivyApplication.cc
@@ -96,11 +96,16 @@ VivyApplication::exec() noexcept
     switch (selectedType) {
     case ApplicationType::CLI: {
         logInfo() << "Begin parsing of the script (DEBUG)";
+        const QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
         std::vector<Script::Token> tokens;
         std::string storage;
         QByteArray scriptFile = selectedScriptDoc->getName().toLocal8Bit();
         try {
             Script::tokenizeFile(scriptFile.data(), &tokens, &storage);
+            if (env.contains("VIVY_DUMP_TOKENS")) {
+                for (const Script::Token tok : tokens)
+                    std::cerr << tok.toString() << "\n";
+            }
         } catch (const std::runtime_error &e) {
             logError() << "Failed to tokenize the file " << VIVY_LOG_QUOTED(scriptFile.data())
                        << ": " << e.what();