From live diagnostics to a runtime error
Read the current Check result, navigate to declarations and distinguish handled errors from failures that end your app.
Check the buffer you are actually editing#
Since build 836, automatic Check works on the current unsaved project snapshot: opening a project, saving, applying or undoing AI changes, and pausing after an edit can trigger it. The typing delay is about 1.2 seconds. This check does not save your files. A result for an older edit revision is discarded rather than displayed as current.
Ordinary automatic checks wait while the app or another command is running. A manual Check takes priority. Settings → Code → Check automatically disables background checking; Restore Defaults enables it again. Fix can still request its own current Check when this setting is off.
Read the list, underline and status together#
Errors use red dotted underlines and warnings use orange. Hover an underline for the diagnostic code and message, and use Diagnostics for the file and location. Underlines belong to the document open in the editor. When the current problems are gone, the status reports BASIC check succeeded.
Jump to a declaration instead of searching its spelling#
| Action | Result |
|---|---|
| Command-click a name, Shift–F2, or Jump to Definition in Edit / the code context menu | Navigate to the project declaration, including qualified names such as Module.Proc. |
| A module or class name | Open its document. |
| A Form or control name | Open the Designer and select the object; a control array selects its lowest Index member. |
| An ambiguous unqualified name | Read the status message and qualify it with its owning document. |
| A built-in or external plugin member | A project definition may not exist; use the API reference. |
The command works with Check errors and unsaved source, but is unavailable while the IDE-launched app runs. Stop first. Find References (Command–Shift–R) answers a different question: where the declaration is used.
A caught error can still be useful evidence#
An IDE Run or Debug reports errors handled by Try/Catch, On Error GoTo or On Error Resume Next in Output. The program keeps the behavior you wrote; logging does not bypass its handler. A line includes the error number and, when available, its BASIC source file and line.
At most 20 handled errors are reported per run, followed by a suppression notice. The same raised error is not reported again merely because an outer handler sees it. Published applications do not emit this IDE-only report. Fix can receive these lines through Last Run output, subject to your sharing choice.
Decide what to do with an unhandled error#
| IDE Run / Debug action | Effect |
|---|---|
| End | End the running application. |
| Go to Line | End the application, then open the owning BASIC document at the reported line. It is disabled when no location is available. |
| Copy | Copy the full details, including the diagnostic information, without ending the dialog. |
| Close the error window | End the application, as with End. |
The dialog shows the runtime number, readable message and available source location. It is not a debugger breakpoint and does not resume the failed statement. The error is also written to Output. In a published app, the dialog uses a simpler message with Copy Details and Close, and does not display internal folder paths. Closing it ends that app too.
Practice on code you can safely discard#
Follow Trace a caught and an unhandled error. It supplies complete handlers, shows how to restore the original behavior, and separates Check, Run and AI evidence. Do not deliberately raise an error in an application that has unsaved customer data.
20f4bfed6b · Build manifestSources & maintenance
Original web explanation, reviewed against these repository sources. API tables and example files follow the implementation.
docs/manual/04-the-ide-at-a-glance.mddocs/manual/15-check-test-and-debug.mdmacos/McBasicIDE/Sources/AutoCheck.swiftmacos/McBasicIDE/Sources/RunErrorNavigation.swiftsrc/McBasic.Build/DefinitionService.cssrc/McBasic.Runtime/McHandledErrors.cssrc/McBasic.Runtime/McRuntimeErrors.cssrc/McBasic.Runtime.UI/McRuntimeErrorDialog.cs