| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file | |
| 2 // for details. All rights reserved. Use of this source code is governed by a | |
| 3 // BSD-style license that can be found in the LICENSE.md file. | |
| 4 | |
| 5 library fletchc.verbs.documentation; | |
| 6 | |
| 7 const String synopsis = """ | |
| 8 Manages interactions with the fletch compiler and runtime. | |
| 9 Example: fletch run sample.dart | |
| 10 | |
| 11 Usage: fletch <action> [<argument>]... | |
| 12 where <action> is one of the following:"""; | |
| 13 | |
| 14 const String debugDocumentation = """ | |
| 15 debug | |
| 16 Start an interactive debug session | |
| 17 | |
| 18 debug backtrace | |
| 19 Print the current stack trace | |
| 20 | |
| 21 debug break <location> | |
| 22 Set a breakpoint at <location>. <Location> must have one of the | |
| 23 formats methodName@bytecodeIndex or filename:line:column | |
| 24 | |
| 25 debug continue | |
| 26 Resume execution of a program when at a breakpoint | |
| 27 | |
| 28 debug delete-breakpoint <n> | |
| 29 Delete breakpoint with id <n> | |
| 30 | |
| 31 debug disasm | |
| 32 Print bytecodes for the selected frame | |
| 33 | |
| 34 debug fibers | |
| 35 Print a stack trace for all fibers | |
| 36 | |
| 37 debug finish | |
| 38 Finish execution of the current frame | |
| 39 | |
| 40 debug frame <n> | |
| 41 Select frame <n> in the stack trace | |
| 42 | |
| 43 debug list | |
| 44 Print source listing for the selected frame | |
| 45 | |
| 46 debug list breakpoints | |
| 47 Print a list of all breakpoints | |
| 48 | |
| 49 debug print <name> | |
| 50 Print the value of the local variable with the given name | |
| 51 | |
| 52 debug print *<name> | |
| 53 Print the structure of the local variable with the given name | |
| 54 | |
| 55 debug print-all | |
| 56 Print the value of all local variables | |
| 57 | |
| 58 debug restart | |
| 59 Restart the selected frame | |
| 60 | |
| 61 debug run-to-main | |
| 62 Run the compiled code on the Fletch VM and break at the main method | |
| 63 | |
| 64 debug step | |
| 65 Step to next source position | |
| 66 | |
| 67 debug step-bytecode | |
| 68 Step one bytecode | |
| 69 | |
| 70 debug step-over | |
| 71 Step to next source location; do not follow calls | |
| 72 | |
| 73 debug step-over-bytecode | |
| 74 Step one bytecode; do not follow calls | |
| 75 | |
| 76 debug toggle internal | |
| 77 Toggle visibility of internal frames | |
| 78 """; | |
| 79 | |
| 80 const String helpDocumentation = """ | |
| 81 help all List all commands | |
| 82 """; | |
| 83 | |
| 84 const String createDocumentation = """ | |
| 85 create session <name> [with <settings file>] | |
| 86 Create a new session with the given name. Read settings from | |
| 87 <settings file> (defaults to '.fletch-settings'). | |
| 88 | |
| 89 Settings are specified in JSON (comments allowed): | |
| 90 | |
| 91 { | |
| 92 // Location of the package configuration file (a relative URI) | |
| 93 "packages": ".packages", | |
| 94 | |
| 95 // A list of strings that are passed to the compiler | |
| 96 "options": ["--verbose"], | |
| 97 | |
| 98 // Values of compile-time constants. These will appear as the results | |
| 99 // expressions like: | |
| 100 // | |
| 101 // const bool.fromEnvironment("<name>") | |
| 102 // const int.fromEnvironment("<name>") | |
| 103 // const String.fromEnvironment("<name>") | |
| 104 // | |
| 105 "constants": { | |
| 106 "<name>": "<value>", | |
| 107 } | |
| 108 } | |
| 109 """; | |
| 110 | |
| 111 const String compileDocumentation = """ | |
| 112 compile <file> [in session <name>] | |
| 113 Compile <file> | |
| 114 """; | |
| 115 | |
| 116 const String attachDocumentation = """ | |
| 117 attach tcp_socket [<host>:]<port> | |
| 118 Attach to Fletch VM on the given socket | |
| 119 """; | |
| 120 | |
| 121 const String runDocumentation = """ | |
| 122 run [<file>] [in session remote] | |
| 123 Run <file> on the Fletch VM. If no <file> is given, run the | |
| 124 previous file. Defaults to running on the local PC; | |
| 125 use 'in session remote' to run remotely. | |
| 126 """; | |
| 127 | |
| 128 const String endDocumentation = """ | |
| 129 x-end session <name> | |
| 130 End the named session | |
| 131 """; | |
| 132 | |
| 133 const String servicecDocumentation = """ | |
| 134 x-servicec <file> | |
| 135 Compile service IDL file named <file> to custom Fletch interface | |
| 136 """; | |
| 137 | |
| 138 const String exportDocumentation = """ | |
| 139 export [<dartfile>] to <snapshot> | |
| 140 Compile <dartfile> and create a snapshot in <snapshot>. If no | |
| 141 <dartfile> is given, export the previously compiled file | |
| 142 """; | |
| 143 | |
| 144 const String quitDocumentation = """ | |
| 145 quit Quits the Fletch background process, and terminates all | |
| 146 Fletch sessions currently running. | |
| 147 """; | |
| 148 | |
| 149 const String showDocumentation = """ | |
| 150 show devices | |
| 151 Show all Fletch capable devices connected | |
| 152 directly or available on the network | |
| 153 | |
| 154 show log [in session <name>] | |
| 155 Show log for given session | |
| 156 """; | |
| 157 | |
| 158 // TODO(lukechurch): Review UX. | |
| 159 const String upgradeDocumentation = """ | |
| 160 x-upgrade agent with <package-file> [in session <session>] | |
| 161 Upgrade the agent used in session to the version provided in the | |
| 162 .deb package <package-file> | |
| 163 """; | |
| 164 | |
| 165 // TODO(lukechurch): Review UX. | |
| 166 const String downloadToolsDocumentation = """ | |
| 167 x-download-tools | |
| 168 Downloads the third party tools required for MCU developemnt. | |
| 169 This is currently GCC ARM Embedded and OpenOCD. | |
| 170 """; | |
| OLD | NEW |