Книга: Embedded Linux development using Eclipse

Actions

Actions

Actions can be attached to a breakpoint such that when it is hit, the attached actions are performed. CDT offers four classes of pre-defined actions:

• Play Sound: Play a selected sound file when the breakpoint is hit. Maybe the breakpoint only happens every half hour or so. You can go off and do something else and when you hear the appropriate beep, you can go back and see what happened. Sound files can be .wav, .mid, .au, or .aiff.

• Log Message: Output a message to the console.

• Run External Tool: Execute a program that has been configured in Eclipse as an external tool. For example, the program might be running on a remote device. You could configure the breakpoint to send an email or SMS to your desktop.

• Resume: Automatically resume the program after a specified delay. Again, if the program is running remotely, this is probably the only way to keep it running after a breakpoint.

From the Actions dialog shown in Figure 4.9 you can create and edit actions using the four classes. Then you can attach one or more of these actions to the selected breakpoint. The actions are executed in the order that they appear in the Actions for this breakpoint list. Actions can be moved up and down in the list.

Try it out. Create a log action and a resume action and, if you’re so inclined, a sound action. Attach them to the breakpoint at line 34 and watch what happens. Be sure you click Apply after setting up the action list.

Оглавление книги

Оглавление статьи/книги

Генерация: 0.030. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз