Code analysis
Optional help while you type – completions, hints and error checking – that runs in your browser.
Code analysis helps you write code in the editor: it suggests how to complete a name, shows hints and underlines errors before you run your program. It runs in your browser – your code is not sent anywhere. It is optional: Run and Submit work the same without it.
What it gives you
Section titled “What it gives you”- Completions. As you type, it suggests variables, functions, library names and keywords, with a short description.
- Hints. Hover over a name to see its type or description; while you type a function call, you see its parameters.
- Errors as you type. Errors and warnings are underlined right away.
- Moving around the code. The command palette (F1) has, for example, Go to definition, finding all references and renaming within the file.
Analysis messages are in English.
| Language | Details |
|---|---|
| Python | Checked as on the judge: Python 3.13, standard library only. Importing other packages is marked as an error, because it would fail when judged |
| C++ | Checked with the same settings as the judge (GNU C++20). Picking a library name adds a missing #include for you. Analysis may word some warnings differently from the compiler – the compiler messages after a run are what counts |
| C# | No code analysis. The editor suggests common keywords and .NET names and has snippets; errors are shown after a run or a submission, from the compiler |
Turning it on
Section titled “Turning it on”Nothing is downloaded until you turn it on, and nothing interrupts you. When a run or a submission of yours ends in a compilation error, and analysis for that language isn’t on this computer yet, a note appears above your code: “Code analysis for C++ is off on this computer. Turn it on to see errors as you type. 79 MB, downloaded once.” (or Python). Keep working, or:
- choose Turn on: the download starts and the note shows its progress (“12.4 of 79 MB”). Hide leaves it to the editor’s header; the download continues. When the files are in, analysis starts and the note goes away;
- choose Not now: the note doesn’t come back until you open the app again another time (a new browser session).
The download is Python about 18 MB, C++ about 79 MB, once per computer; every account on it uses the same copy. While the editor is open, analysis uses about 400 MB (Python) or 550 MB (C++) of memory.
C# has no code analysis, so there is no note and the editor header shows no analysis status for it.
students/learning/code-analysis-offerIf the download fails, you see “The download did not finish. Check the connection and retry.” and a Retry button.
You can also turn analysis on at any time from its state in the editor header (below), before any error. Once you have turned it on, it starts by itself whenever you open the editor; after an update that needs new files, they download in the background.
Your choice is remembered on this computer for your account. If someone else on this computer has already downloaded analysis, and you haven’t turned it off, it turns on without asking.
State in the editor header
Section titled “State in the editor header”Next to the file name you see the state of code analysis. Select it to see an explanation and Turn on, Turn off or Retry.
| State | What it means |
|---|---|
| Analysis on | It is running |
| Starting analysis… | It is starting. On a slower computer this takes a few seconds |
| Downloading 45% | The files are downloading |
| Analysis off | Turned off, or not downloaded yet. Turn on downloads it first if needed (the panel says how much) |
| Download failed | The download stopped; Retry tries again |
| Analysis failed | It could not start. Your code is safe, and Run and Submit work as usual |
| Analysis unavailable | It doesn’t run on this device or in this browser (see below) |
Turn off also stops a download in progress. After you close the editor, analysis stops within a minute and frees its memory.
When it is unavailable
Section titled “When it is unavailable”- Data saver is on in your browser.
- The device has 2 GB of memory or less.
- The browser is too old. C++ analysis needs Chrome or Edge 137, Firefox 153, Safari 27 or newer.
While C++ analysis is off or unavailable, the editor still suggests common C++ keywords and standard-library names, and the snippets.
Updates
Section titled “Updates”When the app is updated, a new version of the analysis may need downloading. If you have turned analysis on, it downloads automatically and the editor header shows its progress.