# Debugging CodeQL code scanning made easier by retaining diagnostic artifacts in Actions

DevFeed: [Debugging CodeQL code scanning made easier by retaining diagnostic artifacts in Actions](<https://devfeed.tech/articles/debugging-codeql-code-scanning-made-easier-by-retaining-diagnostic-artifacts-in-actions-74252.md>)

Original publisher: [Read original article](<https://github.blog/changelog/2021-11-17-debugging-codeql-code-scanning-made-easier-by-retaining-diagnostic-artifacts-in-actions>)

Author: Sidi Merzouk

Published: 2021-11-17T17:11:54Z

Content type: release

Language: en

Sources: [GitHub Changelog](<https://devfeed.tech/sources/github-changelog.md>)

Topics: [trivy](<https://devfeed.tech/topics/trivy.md>), [codefresh](<https://devfeed.tech/topics/codefresh.md>), [builds](<https://devfeed.tech/topics/builds.md>)

Tags: [actions](<https://devfeed.tech/tags/actions.md>), [artifacts](<https://devfeed.tech/tags/artifacts.md>), [code-scanning](<https://devfeed.tech/tags/code-scanning.md>), [codeql](<https://devfeed.tech/tags/codeql.md>), [data](<https://devfeed.tech/tags/data.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [workflow](<https://devfeed.tech/tags/workflow.md>)

## AI overview

Set `debug: true` on the CodeQL `init` step in the Actions workflow to upload a `debug-artifacts` artifact to the workflow run. It contains CodeQL logs, databases, and produced SARIF files, which can help debug code scanning problems and may be requested by GitHub support.

## Source excerpt

It's now easier to debug problems with CodeQL code scanning: an optional flag in the Actions workflow file will trigger diagnostic data to be uploaded as an artifact to your...