You can invoke (run) any executable from Eclipse and see its output in the
Console View.
You just need to create a
Run Configuration from menu
Run > Run....
VlogDT provides one type of configuration:
DVT Generic Run Configuration
Menu
Run > Run Configurations....
Select
DVT Generic configuration and click the
New button.
Specify
name, working directory, run as command or script and the content of the command or script.
Click
Run.
Before writing the command you can specify how to run the content. Run as a:
command: the content must be a single line command with arguments
script: the content must be a multiline script, preceded by a hash exclam; in Windows the script will run using cmd.exe, if a
#!/bin/sh hash exclam exists on the first line the script will be executed using Busybox included in the distribution
If run as a command is selected the content should look like this:
sh -c "echo Test ${string_prompt:Parameter 1} ${string_prompt:Parameter 2}"
or if run as a script is selected a script with hash exclam must be specified:
#!/bin/sh
echo Test ${string_prompt:Parameter 1} ${string_prompt:Parameter 2}
for i in `seq 5 -1 0` ; do
echo Starting in $i seconds
sleep 1
done
echo Test started
Parameters can be specified using Eclipse variables or DVT
Custom_Dialogs can be used for more complex dialogs.
As a result you will be asked to provide the "Parameter 1" e.g. "run"
and "Parameter 2" e.g. "script". The result of running the command will be:
"Test run script"
Note: The parameters ${VAR} are considered Eclipse variables that and will be resolved before running the command. To use shell variables in the command you must use the $VAR syntax.
When running as a command, unresolved Eclipse variables will trigger an error and the run will be aborted. not be reported. When running as a script the unresolved Eclipse variables will remain untouched.
Supported Launch Modes
You may choose if a launch configuration can be launched in Run mode, Debug mode or both.
When both modes are supported, launching from a
custom shortcut or button will prompt for launch mode.
See
DVT Debugger Integration for more details on debugging your code in DVT.
Quick Run
You can launch again at any time from menu
Run > Run History... or directly from the toolbar (simple click launches last):
You can also use the
Run > Quick Run menu (or Ctrl+U shortcut key) to quickly launch any existing Run Configuration:
The
DVT Quick Run dialog will pop-up and present a list of all available Run Configurations. You can use the quick filter to search for a specific Run Configuration, up and down arrows to navigate in the list and Enter to launch:
Output
The invocation output is dumped to the
Console View.
Click on hyperlinks in the Console View to jump directly to the to source location.