Skip to content

Commit 75a2dc4

Browse files
dennisdoomenCopilot
andcommitted
Remove AV1580 guideline
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent b22db49 commit 75a2dc4

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

_pages/Cheatsheet.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ NOTE: Requires Markdown Extra. See http://michelf.ca/projects/php-markdown/extra
9595
* Avoid signatures that take a `bool` flag ({{ site.default_rule_prefix }}1564)
9696
* Prefer `is` patterns over `as` operations ({{ site.default_rule_prefix }}1570)
9797
* Don't comment out code ({{ site.default_rule_prefix }}1575)
98-
* Write code that is easy to debug ({{ site.default_rule_prefix }}1580)
9998

10099
<br/>
101100
**Framework Guidelines**

_rules/1580.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ rule_category: maintainability
44
title: Write code that is easy to debug
55
severity: 2
66
---
7-
Because debugger breakpoints cannot be set inside expressions, avoid overuse of nested method calls. For example, a line like:
7+
Because debugger breakpoints cannot be set inside expressions, avoid overuse of nested method calls. For example, in some IDEs, a line like:
88

99
string result = ConvertToXml(ApplyTransforms(ExecuteQuery(GetConfigurationSettings(source))));
1010

1111
requires extra steps to inspect intermediate method return values. On the other hard, were this expression broken into intermediate variables, setting a breakpoint on one of them would be sufficient.
1212

13-
**Note** This does not apply to chaining method calls, which is a common pattern in fluent APIs.
13+
**Note:** This does not apply to chaining method calls, which is a common pattern in fluent APIs.
14+
15+
**Tip:** [JetBrains Rider](https://www.jetbrains.com/rider/) has a very advanced debugger that allows you to choose into which part of a nested or chained call you want to step. It also displays all intermediate parameter and return values.

0 commit comments

Comments
 (0)