Get code suggestions from Gemini

Use Gemini to get code suggestions while writing code in the Console and Sources panels. From Chrome 142, this feature is available for all text-based resources for a web page. The priority language for code suggestions is JavaScript.

Code suggestion feature in the Console and Sources panels.

Availability

To use the AI assistance panel, make sure that you:

  • Are at least 18 years old and are in one of the supported locations.
  • Are using the latest version of Chrome.
  • Are signed into Chrome with your Google Account.
  • Have English (US) selected in Settings > Preferences > Appearance > Language in DevTools.
  • Have enabled Settings > AI Innovations in DevTools.

The feature is available from Chrome 142.

Enable code suggestions

To enable code suggestions, go to DevTools > Settings > AI innovations > Code suggestions.

Accept a suggestion

As you type in the Console or Sources panel, you'll get code suggestions. The suggestions depend on everything you have typed in the panel so far. Select Tab to accept or Esc to reject a suggestion.

See also