org.eclipse.wst.jsdt.debug.rhino.debugger.shell

## Class DebugMain

- java.lang.Object
- - org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugMain

    public class DebugMain
    extends java.lang.Object

A proxy to running `Main` that allows us to run a batch of scripts without using the `-e load(...)` arguments. As well any argument not paired to a known kind (see below) will be considered as an absolute path to a script (*.js) file.
This runner supports the following:

- `-debug` to have the interpreter generate debugging tracing
- `-e [script_src]` to evaluate the following argument as a script
- `-encoding` to set the character encoding to use
- `-f [absolute_file_paths]` to specify one or more *.js files to evaluate. This argument differs from the Rhino `Main` one, in that any following arguments will be treated as absolute paths to script (*.js) files.
- `-fatal-warnings` to have all warnings are treated as error
- `-help` or `-?`, to pretty-print the available commands
- `-opt` or `-O` to set the optimization level. Where available levels are -1 (interpret only), 0 (none), 1-9 (all optimizations)
- `-port [port]` to set the port to communicate on
- `-sealedlib` to set the standard libraries as sealed - meaning they cannot be modified by any evaluating script(s)
- `-strict` to set the interpreter in strict mode and report all warnings
- `-suspend` to set if the debugger should start suspended and wait for a client to connect before continuing
- `-trace` to enabled debugger tracing
- `-version [version_number]`, where `version_number` is one of: 100, 110, 120, 130, 140, 150, 160, 170
- `-w` to report warnings

The following examples assume you have properly set up your classpath to reference `org.mozilla.javascript.jar`, `org.eclipse.wst.jsdt.debug.rhino.debugger.jar` and `org.eclipse.wst.jsdt.debug.transport`. Also the fully qualified name use to run DebugMain is `org.eclipse.wst.jsdt.debug.rhino.debugger.shell.DebugMain` Examples
`%>java DebugMain -opt 7 -strict -f /home/user/scripts/a.js /home/user/scripts/b.js -version 170` `%> java DebugMain -version 140 -e load('/home/user/scripts/a.js','/home/user/scripts/b.js')`

Since:
  1.1

### Field Summary

Fields
`static java.lang.String` `ARG_DEBUG` Constant representing the debug argument Value is: `-debug`
`static java.lang.String` `ARG_E` Constant representing the evaluate argument Value is: `-e`
`static java.lang.String` `ARG_ENCODING` Constant representing the encoding argument Value is: `-encoding`
`static java.lang.String` `ARG_F` Constant representing the script file(s) argument Value is: `-f`
`static java.lang.String` `ARG_FATAL_WARNINGS` Constant representing the fatal-warnings argument Value is: `-fatal-warnings`
`static java.lang.String` `ARG_HELP` Constant representing the help argument Value is: `-help`
`static java.lang.String` `ARG_O` Constant representing the optimization argument Value is: `-O`
`static java.lang.String` `ARG_OPT` Constant representing the optimization argument Value is: `-opt`
`static java.lang.String` `ARG_QM` Constant representing the help argument Value is: `-?`
`static java.lang.String` `ARG_SEALEDLIB` Constant representing the sealed lib argument Value is: `-sealedlib`
`static java.lang.String` `ARG_STRICT` Constant representing the strict argument Value is: `-strict`
`static java.lang.String` `ARG_W` Constant representing the report warnings argument Value is: `-w`
`static java.lang.String` `FROM_EVAL` Copy from `Main` to specify as the path when evaluating a script via the `-e` argument Value is: `<command>`
`static java.lang.String` `GLOBAL_ARGUMENTS` Constant representing the name of the array containing the original script arguments in the global context Value is: `arguments`
`static java.lang.String` `MSG_SHELL_INVALID` Constant representing the invalid message identifier for `Main` Value is: `msg.shell.invalid`
`static java.lang.String` `MSG_SHELL_USAGE` Constant representing the invalid usage message identifier for `Main` Value is: `msg.shell.usage`

### Constructor Summary

Constructors
Constructor and Description
`DebugMain()`

### Method Summary

All Methods Static Methods Concrete Methods
`static void` `main(java.lang.String[] args)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### ARG_DEBUG

    public static final java.lang.String ARG_DEBUG

Constant representing the debug argument
Value is: `-debug`

See Also:
  Constant Field Values

#### ARG_E

    public static final java.lang.String ARG_E

Constant representing the evaluate argument
Value is: `-e`

See Also:
  Constant Field Values

#### ARG_ENCODING

    public static final java.lang.String ARG_ENCODING

Constant representing the encoding argument
Value is: `-encoding`

See Also:
  Constant Field Values

#### ARG_F

    public static final java.lang.String ARG_F

Constant representing the script file(s) argument
Value is: `-f`

See Also:
  Constant Field Values

#### ARG_FATAL_WARNINGS

    public static final java.lang.String ARG_FATAL_WARNINGS

Constant representing the fatal-warnings argument
Value is: `-fatal-warnings`

See Also:
  Constant Field Values

#### ARG_HELP

    public static final java.lang.String ARG_HELP

Constant representing the help argument
Value is: `-help`

See Also:
  Constant Field Values

#### ARG_O

    public static final java.lang.String ARG_O

Constant representing the optimization argument
Value is: `-O`

See Also:
  Constant Field Values

#### ARG_OPT

    public static final java.lang.String ARG_OPT

Constant representing the optimization argument
Value is: `-opt`

See Also:
  Constant Field Values

#### ARG_QM

    public static final java.lang.String ARG_QM

Constant representing the help argument
Value is: `-?`

See Also:
  Constant Field Values

#### ARG_SEALEDLIB

    public static final java.lang.String ARG_SEALEDLIB

Constant representing the sealed lib argument
Value is: `-sealedlib`

See Also:
  Constant Field Values

#### ARG_STRICT

    public static final java.lang.String ARG_STRICT

Constant representing the strict argument
Value is: `-strict`

See Also:
  Constant Field Values

#### ARG_W

    public static final java.lang.String ARG_W

Constant representing the report warnings argument
Value is: `-w`

See Also:
  Constant Field Values

#### MSG_SHELL_INVALID

    public static final java.lang.String MSG_SHELL_INVALID

Constant representing the invalid message identifier for `Main`
Value is: `msg.shell.invalid`

See Also:
  Constant Field Values

#### MSG_SHELL_USAGE

    public static final java.lang.String MSG_SHELL_USAGE

Constant representing the invalid usage message identifier for `Main`
Value is: `msg.shell.usage`

See Also:
  Constant Field Values

#### FROM_EVAL

    public static final java.lang.String FROM_EVAL

Copy from `Main` to specify as the path when evaluating a script via the `-e` argument
Value is: `<command>`

See Also:
  Constant Field Values

#### GLOBAL_ARGUMENTS

    public static final java.lang.String GLOBAL_ARGUMENTS

Constant representing the name of the array containing the original script arguments in the global context
Value is: `arguments`

See Also:
  Constant Field Values

### Constructor Detail

#### DebugMain

    public DebugMain()

### Method Detail

#### main

    public static void main(java.lang.String[] args)

Parameters:
  `args` -