-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into tgriesser/feat/UNIFY-1774-auto-source-web…
…pack * develop: fix: UNIFY-1408, warnings should be nested appropriately & clearable (#21630) chore: fix unit-tests-release job (#21652) chore(deps): update dependency eventsource to v2 [security] (#21639) fix: Add hover states for test titles in reporter (#21635) docs(CONTRIBUTING): Fix link to "good first issue" for newcomers (#21614) chore: compare `cy.screenshot` images in percy (#21598) fix: switching from ct to e2e (non-configured) does not go through setup (#21607) fix: issue with compilation failures in component testing (#21599) test: fix flaky launchpad test (#21637) docs: remove gitter link in contributing guide. (#21592) fix: order projects by most recently opened (#21589) fix: prevent crash on runs visit when offline (#21618) fix: pass family parameter to connect method (#21545) chore: clean up `debug` statements in preparation for 10.0 release, add `debug` docs (#21621) chore: add regression test for ts detection (#21578)
- Loading branch information
Showing
133 changed files
with
2,460 additions
and
727 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Debug Logs | ||
|
||
Many Cypress packages use the [`debug` module][debug] to log runtime info to the console. | ||
|
||
## Choosing a namespace | ||
|
||
The naming scheme for debug namespaces should generally follow this pattern: | ||
|
||
``` | ||
cypress:{packageName}:{relative path to file from src root, using : to separate directories, minus index if applicable} | ||
# examples: | ||
# packages/server/lib/util/file.js -> cypress:server:util:file | ||
# packages/launcher/windows/index.ts -> cypress:launcher:windows | ||
``` | ||
|
||
`cypress-verbose` can be used instead of `cypress` if the logs are overly verbose and would make the output of `DEBUG=cypress:*` unreadable. | ||
|
||
Exceptions to these rules: | ||
* The `cli` uses `cypress:cli:*`. | ||
* NPM packages should use `{moduleName}` as a prefix instead of `cypress`, like `cypress-webpack-preprocessor` for `npm/webpack-preprocessor`. | ||
* In some places, like per-request in the `proxy` package, it's more useful to attach `debug` messages to something besides the module (like individual HTTP requests). In that case, it's okay to create namespaces as you see fit. But at least begin with `cypress:{packageName}` or `cypress-verbose:{packageName}` | ||
|
||
## Using debug logs | ||
|
||
Pass the `DEBUG` environment variable to select a set of logs to print to `stderr`. Example selectors: | ||
|
||
```shell | ||
# frequently useful to get a sense of what is happening in the app at a high level | ||
DEBUG=cypress:* | ||
# print all info and verbose logs, but don't print verbose logs from `some-noisy-package` | ||
DEBUG=cypress:*,cypress-verbose:*,-cypress-verbose:some-noisy-package:* | ||
# print out verbose per-request data for proxied HTTP requests | ||
DEBUG=cypress-verbose:proxy:http | ||
|
||
# in the browser, set `localStorage.DEBUG`: | ||
localStorage.DEBUG = 'cypress:driver,cypress:driver:*' | ||
``` | ||
|
||
For more info, see the [public documentation for printing debug logs](https://docs.cypress.io/guides/references/troubleshooting#Print-DEBUG-logs) and the [`debug` module docs][debug] | ||
|
||
[debug]: https://github.com/visionmedia/debug#readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.