Microsoft ® Small Basic. Debugging Aids. Estimated time to complete this lesson: 1 hour. Debugging Aids. In this lesson, you will learn how to:. Use the TextWindow . WriteLine operation to debug your programs. . Debugging .
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Estimated time to complete this lesson: 1 hour
In this lesson, you will learn how to:
Use the TextWindow.WriteLine operation to debug your programs.
Even a minor bug in a program can defeat the efforts of the programmer!
So how can you debug programs in Small Basic?
To debug your program, you can use the TextWindow.WriteLine operation. This operation acts as a debugging helper, and it provides information to help debug your program.
Let’s look at an example that uses the TextWindow.WriteLine operation for debugging.
Now, let’s use the TextWindow.WriteLine operation in another program and see how it can help you debug the program.
In this example, you use the Flickr object to download a photo from www.flickr.com and display it on the graphics window.
Now, let’s write a program to copy a file and display its contents in the text window.
Now how do we detect the error? It’s time to debug your code again…
In this example, if the CopyFileoperation is successful, the text window displays the contents of the file.
Let’s use the TextWindow.WriteLine operation to detect the error.
Congratulations! Now you know how to: