Search code examples
delphidebuggingdelphi-7

Delphi 7 - Copy the contents of a local variable (during debugging) to the clipboard


Just wondering if its possible to copy the contents of (any) variable to the clipboard?

That is, during debugging, i can hover my mouse over the variable and it shows me the value. I wish to copy this value to the clipboard.


Solution

  • Alternative 1

    During debugging select variable name and press CTRL+F7 or click in menu Debug|Evaluate/Modify. This will open Evaluate/Modify dialog box in which you can select variable value and copy it.

    Alternative 2

    You can also add watch. When you have watch on variable, you can right click on it in Watch List and select "Copy Watch Value" from context menu. To add watch, you can for e.g. double click on empty space in Watch List (CTRL+ALT+W) during debugging or use Add Watch button in Evaluate/Modify dialog box.

    Alternative 3

    If it's local variable, during debugging you can right click it in Local Variables (CTRL+ALT+L) and select "Copy Value" from context menu.