Using Custom Shortcuts with VisualGDB

This tutorial shows how to define and use custom shortcuts for VisualGDB projects outside of building and debugging.

Before we begin, ensure that VisualGDB 4.1 or later is installed.

  1. For the purpose of this tutorial we use the code from the ImageMagick tutorial, but create the project using file transfer instead of shared folders. Note that the techniques described in this tutorial apply to all VisualGDB Project types (e.g. also for Windows, Android or Embedded).
  2. Build the project and make sure there is a image file to modify. Here we use the ArrowRight.png file in the project directory as in the previous tutorial.
  3. In the next steps we will make a custom shortcut that will transfer the image file to the build machine, run our program with it, then transfer back the transformed image and open it.
  4. Open VisualGDB Project Properties.001-properties
  5. Go to the Custom shortcuts page and click on Add.002-shortcuts
  6. Name the new action list and click on “Add” to add a new command. The action list name will be displayed in menus later on.002-new
  7. Add a command to transfer the ArrowRight.png file from the local machine to the build machine. Click on OK.004-transfer
  8. Add another command to execute the program with the arguments on the remote machine. Click on OK.005-run
  9. Add a command to transfer the resulting ArrowRotated.png back to the local machine. Click on OK.006-retrieve
  10. Add a command to open the ArrowRotated.png on the local machine. Click on OK.007-open
  11. The resulting command list looks as follows. Click on OK.008-shortcut
  12. Now a custom shortcut is specified. Click on OK to exit the Project Properties.010-customshortcut
  13. Go to the Project menu and execute the custom shortcut.009-test
  14. A window will appear showing the custom actions of the shortcut.011-runninf
  15. The picture will be opened. You can close the command window now.012-paint
  16. All the text output from custom shortcuts is put into a special filter of the Output window.013-output
  17. You can also execute custom shortcuts from the toolbar. To show the VisualGDB toolbar, right-click in the toolbar area and choose “VisualGDB”. 014-addtoolbar
  18. To execute custom shortcuts from the toolbar, first select the command from the list and click on “Execute Shortcut”. The command will execute the same way as from the Project menu.015-executefromtoolbar