|
| 1 | +changeset |
| 2 | +========= |
| 3 | + |
| 4 | +An SFDX plugin that can retrieve components from a changeset into an org-based project |
| 5 | + |
| 6 | +[](https://npmjs.org/package/changeset) |
| 7 | +[](https://circleci.com/gh/loganm/sfdx-changeset/tree/master) |
| 8 | +[](https://ci.appveyor.com/project/heroku/sfdx-changeset/branch/master) |
| 9 | +[](https://codecov.io/gh/loganm/sfdx-changeset) |
| 10 | +[](https://greenkeeper.io/) |
| 11 | +[](https://snyk.io/test/github/loganm/sfdx-changeset) |
| 12 | +[](https://npmjs.org/package/changeset) |
| 13 | +[](https://github.com/loganm/sfdx-changeset/blob/master/package.json) |
| 14 | + |
| 15 | +<!-- toc --> |
| 16 | +* [Debugging your plugin](#debugging-your-plugin) |
| 17 | +<!-- tocstop --> |
| 18 | +<!-- install --> |
| 19 | +<!-- usage --> |
| 20 | +```sh-session |
| 21 | +$ npm install -g changeset |
| 22 | +$ sfdx COMMAND |
| 23 | +running command... |
| 24 | +$ sfdx (-v|--version|version) |
| 25 | +changeset/0.0.0 darwin-x64 node-v11.9.0 |
| 26 | +$ sfdx --help [COMMAND] |
| 27 | +USAGE |
| 28 | + $ sfdx COMMAND |
| 29 | +... |
| 30 | +``` |
| 31 | +<!-- usagestop --> |
| 32 | +<!-- commands --> |
| 33 | +* [`sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]`](#sfdx-helloorg--n-string--f--v-string--u-string---apiversion-string---json---loglevel-tracedebuginfowarnerrorfatal) |
| 34 | + |
| 35 | +## `sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]` |
| 36 | + |
| 37 | +print a greeting and your org IDs |
| 38 | + |
| 39 | +``` |
| 40 | +USAGE |
| 41 | + $ sfdx hello:org [-n <string>] [-f] [-v <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel |
| 42 | + trace|debug|info|warn|error|fatal] |
| 43 | +
|
| 44 | +OPTIONS |
| 45 | + -f, --force example boolean flag |
| 46 | + -n, --name=name name to print |
| 47 | + -u, --targetusername=targetusername username or alias for the target org; overrides default target org |
| 48 | + -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub org; overrides default dev hub org |
| 49 | + --apiversion=apiversion override the api version used for api requests made by this command |
| 50 | + --json format output as json |
| 51 | + --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation |
| 52 | +
|
| 53 | +EXAMPLES |
| 54 | + $ sfdx hello:org --targetusername myOrg@example.com --targetdevhubusername devhub@org.com |
| 55 | + Hello world! This is org: MyOrg and I will be around until Tue Mar 20 2018! |
| 56 | + My hub org id is: 00Dxx000000001234 |
| 57 | + |
| 58 | + $ sfdx hello:org --name myname --targetusername myOrg@example.com |
| 59 | + Hello myname! This is org: MyOrg and I will be around until Tue Mar 20 2018! |
| 60 | +``` |
| 61 | + |
| 62 | +_See code: [src/commands/hello/org.ts](https://github.com/loganm/sfdx-changeset/blob/v0.0.0/src/commands/hello/org.ts)_ |
| 63 | +<!-- commandsstop --> |
| 64 | +<!-- debugging-your-plugin --> |
| 65 | +# Debugging your plugin |
| 66 | +We recommend using the Visual Studio Code (VS Code) IDE for your plugin development. Included in the `.vscode` directory of this plugin is a `launch.json` config file, which allows you to attach a debugger to the node process when running your commands. |
| 67 | + |
| 68 | +To debug the `hello:org` command: |
| 69 | +1. Start the inspector |
| 70 | + |
| 71 | +If you linked your plugin to the sfdx cli, call your command with the `dev-suspend` switch: |
| 72 | +```sh-session |
| 73 | +$ sfdx hello:org -u myOrg@example.com --dev-suspend |
| 74 | +``` |
| 75 | + |
| 76 | +Alternatively, to call your command using the `bin/run` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger: |
| 77 | +```sh-session |
| 78 | +$ NODE_OPTIONS=--inspect-brk bin/run hello:org -u myOrg@example.com |
| 79 | +``` |
| 80 | + |
| 81 | +2. Set some breakpoints in your command code |
| 82 | +3. Click on the Debug icon in the Activity Bar on the side of VS Code to open up the Debug view. |
| 83 | +4. In the upper left hand corner of VS Code, verify that the "Attach to Remote" launch configuration has been chosen. |
| 84 | +5. Hit the green play button to the left of the "Attach to Remote" launch configuration window. The debugger should now be suspended on the first line of the program. |
| 85 | +6. Hit the green play button at the top middle of VS Code (this play button will be to the right of the play button that you clicked in step #5). |
| 86 | +<br><img src=".images/vscodeScreenshot.png" width="480" height="278"><br> |
| 87 | +Congrats, you are debugging! |
0 commit comments