Summary

This chapter explored the concepts that would not be required in the "perfect world"—troubleshooting, which is basically finding out why your application does not work as expected.

First, we described the available solutions for logging and tracing your Tcl application. From the log, logger ,or audit packages, you may chose the one that closest fulfils your expectations and requirements. We've shown how each of the packages work and what the key differences are between them.

Next, we described a variety of tools that allow you to take a good look at the internals, and analyse and interact with the running application. Starting from the TclDevKit Inspector, which is a tool that allows you to view the internal components of the application. It is a lightweight tool that can easily be used to connect to a running application, view or modify its parameters, and disconnect from it.

We then moved on to using a full-fledged TclDevKit Debugger with all its richness of features. We've shown how to use it to find and resolve a simple problem, and how to use it to debug remote applications.

In this chapter, we have learned:

  • The available solutions for logging in Tcl
  • How to configure and use it—how to create loggers, define log levels, write your logs to file or channel
  • How to trace the execution of your code
  • How to gain an insight into the running application by using the Inspector
  • How to debug your application in both the local and remote way
  • The key differences between the free TclPro Debugger and the paid ActiveState Tcl Dev Kit Debugger

After this chapter, troubleshooting and finding bugs in the code should be less painful, and allow you to spend more time on developing the functionality, not fixing it.

In the next chapter, we will focus on another fundamental concept: data storage, including topics such as accessing SQL databases, processing XML documents, and more.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.174.253