Ghostwriter can give you step-by-step natural language explanations of your code with Explain Code. This feature is especially useful when trying to understand other people's code or code you wrote in the past.
Consider this example from 100 Days of Code. Follow these steps:
- Select the block of code you want explained.
- Right-click in the editor to open up the context menu.
Explain codefrom the context menu and wait for Ghostwriter to generate an explanation for the code you selected.
- Once your explanation has been generated, you'll see a step-by-step walkthrough of the code you selected.
- If the explanation wasn't helpful, you can have Ghostwriter try again by pressing the
Generate new feedbackbutton.
- You can also help Ghostwriter improve by telling us whether it was a good explanation, and/or pressing the
Share feedbackbutton to provide written details.