Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
George Omura. Lisp programing tutorial for AutoCAD customization / Using VBA to Create AutoCAD Applications - Omura, George.pdf
Скачиваний:
113
Добавлен:
02.05.2014
Размер:
883.43 Кб
Скачать

36

CHAPTER NINETY-NINE • USING VBA TO CREATE AUTOCAD APPLICATIONS

To exit break mode, press the F5 key. This restarts your code running normally again.

The Call Stack

If your application is complex, it may be difficult to keep track of the flow of program control while you’re debugging. You can use the Call Stack to show which code is running at any given time. The Call Stack is a separate window in the VBA editor. You can open this window by selecting View Call Stack or using the Ctrl+L keyboard shortcut. Figure 99.27 shows the VBA Call Stack in action.

Figure 99.27 The Call Stack

This particular Call Stack shows that you’re currently debugging the cmdSelectLine_Click code, and that it was ultimately launched with the ModifyLines procedure. The <Non-Basic Code> in the middle indicates that the display of the form was handled by AutoCAD, and that you can’t debug that portion of the process.

The Locals Window

Another useful debugging tool is the Locals window, which can be opened with ViewLocals Window. This window provides a way to explore all of the variables that are currently in scope—that is, all of the variables that are visible to the current procedure. Figure 99.28 shows the Locals window.

Copyright ©2001 SYBEX, Inc., Alameda, CA

www.sybex.com