File Operations - Debugger
Loading a Source Code File into the Debugger
To load a file into the Debugger and begin a debugging session, do one of the following:
-
Right-click on the name of the file in the NetBeans Explorer Filesystems window to open the pop-up menu associated with the file, then select the BBj Debug menu item.
-
Left-click on the name of the file in the NetBeans Explorer Filesystems window to highlight it, then enter Alt+F5 from the keyboard.
This opens the selected file in the Debugger. The first line of the file is highlighted as the current line. Any existing syntax errors will also be highlighted, as well as any previously stored breakpoints from the breakpoint file, if one exists. When the painting of the Debugger's edit window is complete, the loaded program is ready to be run, debugged and tested, or edited.
Warning: The Command Console makes it possible to empty the contents of the Debugger's editor window and load some other file in its place, using the same commands that work in the BBj SysConsole, TermConsole or WinConsole, but doing so is not recommended and will have undocumented effects. The BBj interpreter will understand the change to a different program, but the NetBeans Explorer and the BBj plug-in module will not.
Saving a Source Code File from the Debugger
To save a file after editing changes have been made in the Debugger, do one of the following:
-
Right-click in the edit window to open the pop-up menu and select Save as BBj Tokens to save the file in tokenized format, or Save Document to save the file as text.
-
Select either Save or Save as BBj Tokens from the File menu on the main menu.
-
Enter Ctrl+S on the keyboard to save the file as text.
When the file is saved, any breakpoints that are present will be saved to a breakpoint file with the extension .bpf. If a corresponding breakpoint file was present when the source file was first loaded in the Debugger, but all the breakpoints were removed during the debugging session and then the source file was saved without any breakpoints, the existing breakpoint file will be deleted.
The file can also be saved via the Command Console using the same commands that work in the BBj SysConsole, TermConsole or WinConsole. While this is fine in most cases, there is a subtle difference between saving via the IDE-provided menus and shortcuts and saving via the Command Console. The IDE interface gets the saved program's text directly from the editor window's Java document. The Command Console sends the save command to the BBj interpreter on the server side, which saves the text held in its memory without consulting the editor window's document on the client side. In addition, breakpoints are not be saved when the Command Console is used to save the file.
>