Building with Codegen
Flagging Symbols
Learn how to use symbol flags for debugging, tracking changes, and marking code for review
Flagging Symbols
Symbol flags are a powerful feature in Codegen that allow you to mark and track specific code elements during development, debugging, or code review processes. Flags can be used to visually highlight code in the editor and can also integrate with various messaging systems.
Basic Usage
The simplest way to flag a symbol is to call the flag()
method on any symbol:
When you flag a symbol, two things happen:
- A visual flag emoji (🚩) is added as an inline comment
- A
CodeFlag
object is created to track the flag in the system
Language-Specific Behavior
The flag system adapts automatically to the programming language being used:
Example: Code Analysis
Here’s an example of using flags during code analysis:
This feature is particularly useful when building, and iterating on the symbols that you are trying to modify.
Was this page helpful?