GH-200 practice question 12 of 15
Which workflow command would output the debug message "action successfully debugged"?
Full set: 100 questionsGitHub Actions uses a specific syntax for runner commands, which are processed by the runner to perform tasks like setting outputs or logging messages. To output a debug message, the command is ::debug:: followed by the message string. When the runner encounters this format in the logs, it interprets it as a debug message. These messages are only displayed in the workflow run logs if you have enabled step debug logging by setting the ACTIONSSTEPDEBUG secret to true.
A. The format ::debug::message= is incorrect; the message= part is not part of the debug command syntax.
B. This is a plain string and does not use the :: delimiters required for the runner to recognize it as a workflow command.
D. The trailing colon is not part of the correct syntax for a debug command and will not be parsed correctly by the runner.
1. GitHub Docs. (n.d.). Workflow commands for GitHub Actions. Retrieved from https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-debug-message. The documentation provides the exact syntax: echo "::debug::This is a debug message".
2. GitHub Docs. (n.d.). Enabling debug logging. Retrieved from https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging. This page explains how to view the debug messages set by the ::debug:: command.
Keep practicing
Take the free GH-200 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other GH-200 practice questions
- Question 1Which action type should be used to bundle a series of run steps into a reusable custom a…
- Question 2As a developer, which workflow steps should you perform to publish an image to the GitHub…
- Question 3Where should workflow files be stored to be triggered by events in a repository?
- Question 5Which default environment variable specifies the branch or tag that triggered a workflow?
- Question 6As a developer, what is the safest way to reference an action to prevent modification of …
- Question 7Without the need to use additional infrastructure, what is the simplest and most maintain…
