Debugging a Basic Program

Breakpoints and Single Step Execution

You can check each line in your Basic program for errors using single step execution. Errors are easily traced since you can immediately see the result of each step. A pointer in the breakpoint column of the Editor indicates the current line. You can also set a breakpoint if you want to force the program to be interrupted at a specific position.

Double-click in the breakpoint column at the left of the Editor window to toggle a breakpoint at the corresponding line. When the program reaches a breakpoint, the program execution is interrupted.

The single step execution using the Single Step icon causes the program to branch into procedures and functions.

The procedure step execution using the Procedure Step icon causes the program to skip over procedures and functions as a single step.

Properties of a Breakpoint

The properties of a breakpoint are available through its context menu by right-clicking the breakpoint in the breakpoint column.

You can activate and deactivate a breakpoint by selecting Active from its context menu. When a breakpoint is deactivated, it does not interrupt the program execution.

Select Properties from the context menu of a breakpoint or select Breakpoints from the context menu of the breakpoint column to call the Breakpoints dialog where you can specify other breakpoint options.

The list displays all breakpoints with the corresponding line number in the source code. You can activate or deactivate a selected breakpoint by checking or clearing the Active box.

The Pass Count specifies the number of times the breakpoint can be passed over before the program is interrupted. If you enter 0 (default setting) the program is always interrupted as soon as a breakpoint is encountered.

Click Delete to remove the breakpoint from the program.

Observing the Value of Variables

You can monitor the values of a variable by adding it to the Watch window. To add a variable to the list of watched variables, type the variable name in the Watch text box and press Enter.

The values of variables are only displayed if they are in scope. Variables that are not defined at the current source code location display ("Out of Scope") instead of a value.

You can also include arrays in the Watch window. If you enter the name of an array variable without an index value in the Watch text box, the content of the entire array is displayed.

Nõuande ikoon

If you rest the mouse over a predefined variable in the Editor at run-time, the content of the variable is displayed in a pop-up box.


The Call Stack Window

Provides an overview of the call hierarchy of procedures and functions. You can determine which procedures and functions called which other procedures and functions at the current point in the source code.

List of Run-Time Errors

1 An exception occurred

2 Syntax error

3 Return without Gosub

4 Incorrect entry; please retry

5 Invalid procedure call

6 Overflow

7 Not enough memory

8 Array already dimensioned

9 Index out of defined range

10 Duplicate definition

11 Division by zero

12 Variable not defined

13 Data type mismatch

14 Invalid parameter

18 Process interrupted by user

20 Resume without error

28 Not enough stack memory

35 Sub-procedure or function procedure not defined

48 Error loading DLL file

49 Wrong DLL call convention

51 Internal error

52 Invalid file name or file number

53 File not found

54 Incorrect file mode

55 File already open

57 Device I/O error

58 File already exists

59 Incorrect record length

61 Disk or hard drive full

62 Reading exceeds EOF

63 Incorrect record number

67 Too many files

68 Device not available

70 Access denied

71 Disk not ready

73 Not implemented

74 Renaming on different drives impossible

75 Path/file access error

76 Path not found

91 Object variable not set

93 Invalid string pattern

94 Use of zero not permitted

250 DDE viga

280 DDE ühenduse vastuse ootamine

281 DDE kanalid pole saadaval

282 Ükski rakendus ei vastanud DDE ühenduse algatamisele

283 Liiga palju rakendusi vastas DDE ühenduse algatamisele

284 DDE kanal lukustatud

285 Väline rakendus ei saa täita DDE operatsiooni

286 Aegumine DDE vastuse ootamisel

287 Kasutaja vajutas DDE operatsiooni ajal nuppu ESCAPE

288 Väline rakendus on hõivatud

289 DDE operatsioon ilma andmeteta

290 Andmed on vales vormingus

291 Välise rakenduse töö katkestati

292 DDE ühendus on katkestatud või muudetud

293 DDE meetod kutsuti välja ilma avatud kanalita

294 Sobimatu DDE lingi vorming

295 DDE sõnum kadus ära

296 Lingi asetamine on juba sooritatud

297 Vigase lingi teema tõttu pole võimalik määrata lingi režiimi

298 DDE vajab DDEML.DLL faili

323 Module cannot be loaded; invalid format

341 Invalid object index

366 Object is not available

380 Incorrect property value

382 This property is read-only

394 This property is write-only

420 Invalid object reference

423 Property or method not found

424 Object required

425 Invalid use of an object

430 OLE Automation is not supported by this object

438 This property or method is not supported by the object

440 OLE automation error

445 This action is not supported by given object

446 Named arguments are not supported by given object

447 The current locale setting is not supported by the given object

448 Named argument not found

449 Argument is not optional

450 Invalid number of arguments

451 Object is not a list

452 Invalid ordinal number

453 Specified DLL function not found

460 Invalid clipboard format

951 Unexpected symbol:

952 Oodati:

953 Oodati sümbolit

954 Oodati muutujat

955 Oodati silti

956 Väärtust pole võimalik rakendada

957 Variable already defined

958 Sub procedure or function procedure already defined

959 Label already defined

960 Muutujat ei leitud

961 Array or procedure not found

962 Procedure not found

963 Label undefined

964 Unknown data type

965 Exit expected

966 Statement block still open: missing

967 Sulud ei ühti

968 Symbol already defined differently

969 Parameetrid ei vasta protseduurile

970 Vigane sümbol arvus

971 Massiiv peab olema kindlate mõõtmetega

972 Else/Endif ilma If-ita

973 not allowed within a procedure

974 not allowed outside a procedure

975 Mõõtmete spetsifikatsioonid ei ühti

976 Unknown option:

977 Constant redefined

978 Programm on liiga suur

979 Stringid ja massiivid ei ole lubatud

1000 Objektil pole seda atribuuti

1001 Objektil puudub see meetod

1002 Vajalik argument on puudu

1003 Vigane argumentide arv

1004 Viga meetodi täitmisel

1005 Viga atribuudi sättimisel

1006 Atribuudi kindlaksmääramine pole võimalik