Skip to content

Commit 7b23341

Browse files
committed
add debug mode docs
1 parent 7290a2a commit 7b23341

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/make.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DocMeta.setdocmeta!(
1111
Random.seed!(0) # frule doctest shows output
1212

1313
using ChainRulesCore
14-
# These rules are all actually defined in ChainRules.jl, but we redefine them here to
14+
# These rules are all actually defined in ChainRules.jl, but we redefine them here to
1515
# avoid the dependency.
1616
@scalar_rule(sin(x), cos(x)) # frule and rrule doctest
1717
@scalar_rule(sincos(x), @setup((sinx, cosx) = Ω), cosx, -sinx) # frule doctest
@@ -28,6 +28,7 @@ makedocs(
2828
"Introduction" => "index.md",
2929
"FAQ" => "FAQ.md",
3030
"Writing Good Rules" => "writing_good_rules.md",
31+
"Debug Mode" => "debug_mode.md",
3132
"API" => "api.md",
3233
],
3334
strict=true,

docs/src/api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ Private = false
3030
## Internal
3131
```@docs
3232
ChainRulesCore.AbstractDifferential
33+
ChainRulesCore.debug_mode
3334
```

docs/src/debug_mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Debug Mode
22

3-
ChainRules supports a [`debug_mode`](@ref) which you can use while writing new rules.
3+
ChainRules supports a *debug mode* which you can use while writing new rules.
44
It provides better error messages.
55
If you are developing some new rules, and you get a weird error message,
66
it is worth enabling debug mode.
77

88
There is some overhead to having it enabled, so it is disabled by default.
99

10-
To enable redefine the `debug_mode()` function to return `true`.
10+
To enable redefine the []`ChainRulesCore.debug_mode`](@ref) function to return `true`.
1111
```julia
1212
ChainRulesCore.debug_mode() = true
1313
```

0 commit comments

Comments
 (0)