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”The first time you open the editor with a language whose analysis isn’t on this computer yet, a window asks “Turn on code analysis for C++?” (or Python). It tells you:
- what code analysis gives and that your code stays in the browser;
- the download size: Python about 18 MB, C++ about 79 MB. It is downloaded once per computer; every account on it uses the same copy;
- the memory it uses while the editor is open: Python about 400 MB, C++ about 550 MB.
C# has no code analysis, so no window opens and the editor header shows no analysis status for it.
students/learning/code-analysis-dialog- Choose Continue. The download starts and shows its progress (“12.4 of 79 MB”).
- You can close the window with Close – the download continues, and the editor’s header shows its progress.
- When the files are in, analysis starts and the window closes.
If the download fails, you see “The download did not finish. Check the connection and retry.” and a Retry button.
Choosing Cancel (or closing the window before Continue) leaves analysis off. It isn’t final – you can turn it on later.
Your choice is remembered on this computer for your account, so the window doesn’t ask again. 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 asks first if a download is needed |
| 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.