Friday, July 6, 2007

FlashDevelop trace code snippet



Then open <FD>/settings/MainMenu.xml, and add in the InsertMenu:


Code:
<button label="&amp;Trace(clipboard)" click="InsertSnippet" tag="trace" shortcut="Ctrl|Shift|V" />




Now you can copy (Ctrl+C) a variable and paste (Ctrl+Shift+V) the trace() statement




2 comments:

  1. good one. I'm using it with this trace snippet

    trace ("$(TypName) ::: $(Clipboard) = " + $(Clipboard)$(EntryPoint));

    ReplyDelete
  2. warning for all users of this trick

    At this point (version 3.3.4) FlashDevelop now uses "Control" instead os "Ctrl" in the settings XML files.

    So one must now replace the keyboard shortcut part with the word "control"

    (...) shortcut="Control|Shift|V" (...)

    BUT please note, the combination "Control-Shift-V" is now being used by default as "Close All".

    So, one must also change that in order to use the "V" for this action. As "Control-Shift-W" is by default "Close others", in the end I chose the following shortcuts for these actions:

    "Control-Shift-V" - trace
    "Control-Shift-W" - close all
    "Control-Shift-O" - close others

    thanks for this awesome tip Feng

    ReplyDelete