To get started, globally install the
debugbear Node module and generate an API key. You'll also need to know the ID of the page you want to analyze.
The command below will analyze the page and show it in the normal results view.
DEBUGBEAR_API_KEY=... debugbear --pageId=... --waitForResult
The output will look like this:
Repo: not specified Commit: not specified When the result is ready you can see it here: https://www.debugbear.com/viewResult/12345678 Waiting for result Analysis complete
To run DebugBear as part of CI you either need to deploy the CI build to a public server or use a tool like ngrok to make the local server accessible.
If you customize a build it will not show up as part of the continous monitoring of your live site, but will only show up as a build or on the branch. Customization could mean passing in a URL, tweaking the login details, or passing in custom headers. (This only applies if your analysis has a commitHash.)
The base build is either the latest daily monitoring result, or the latest build on a base branch, if
--baseBranch is passed into the CLI and a build on that branch is available.
debugbear \ --pageId=... \ --commitHash=fd9aed3 \ --commitBranch=my-feature-branch \ --buildTitle="Commit message" \ --baseBranch=master \ http://deployed-branch.example.com
Often these options can be inferred using env-ci, so you usually don't need to pass in
--buildTitle. To enable this feature pass in the
If you aren't deploying your build to a staging server you can use your CI environment as one. You can use ngrok to expose your CI environment publicly.
debugbear, pass in the
--ngrokWebPort=4040 option. This lets DebugBear find out the domain name of your server. The pathname will be take from the monitored page, or you can use
--path=/somewhere to overrride it.
Make sure to also pass in
--waitForResult to keep your CLI server up until the analysis has finished.
You can read a more detailed how-to guide here.
This is the full list of available CLI options.
|...url||Override the URL that's analyzed|
|--pageId||Which of the pages in your project the analzyed page belongs to|
|--waitForResult||[CLI only] Don't exit CLI command until the analysis has finished|
|--inferBuildInfo||Infer commit hash, commit branch, build title, base branch, and base hash from the local version control environment and the environment variables of the CI system|
|--commitHash||Hash of the commit being built, used for build comparison and Github integration|
|--commitBranch||Branch that's being built, used for build comparison and Github integration|
|--buildTitle||Name of the build, defaults to the git commit message|
|--baseBranch||Branch to compare the commit to, usually something like master or develop|
|--baseHash||Commit hash to compare the commit to|
|--repoOwner||Used for Github integration, username or organization that owns the repo|
|--repoName||Used for Github integration, name of the git repo|
|--ngrokWebPort||Port for the ngrok admin interface, usually 4040|
|--path||Pathname of the page if different than what the
|--customHeader(s)||Extra HTTP header to be sent for each request, formatted at
|--loginStep.username||Override what username or email is used for the page login step. Use an object when usign the Node API:
|--loginStep.password||Override what password is used for the page login step|