Whenever I want a breakpoint someplace where there isnt anything to break on just (inside a loop, &c), I tend to automatically drop down a:
int i = 2;
I'm curious what others use.
Visual Studio lets you break on a brace.
In the .NET Framework (using C# here):
System.Diagnostics.Debugger.Break();
To avoid typing this every time just create a new code snippet for your preferred language:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>sddb</Title>
<Shortcut>sddb</Shortcut>
<Description>
Code snippet for System.Diagnostics.Debugger.Break()
</Description>
<Author>Peter McG</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
<![CDATA[System.Diagnostics.Debugger.Break();$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With