{"id":18562,"date":"2020-04-30T13:18:51","date_gmt":"2020-04-30T13:18:51","guid":{"rendered":"https:\/\/blog.jetbrains.com\/dotnet\/?p=24987"},"modified":"2020-04-30T13:18:51","modified_gmt":"2020-04-30T13:18:51","slug":"smart-step-enabled-default-debugger-updates-rider-2020-1","status":"publish","type":"dotnet","link":"https:\/\/blog.jetbrains.com\/zh-hans\/dotnet\/2020\/04\/30\/smart-step-enabled-default-debugger-updates-rider-2020-1","title":{"rendered":"Smart Step Into Enabled by Default and More Debugger Updates in Rider 2020.1"},"content":{"rendered":"<p><a href=\"https:\/\/blog.jetbrains.com\/dotnet\/2020\/02\/19\/rider-2020-1-roadmap\/\">Rider 2020.1<\/a> has a lot of excellent features in store for you! In this post, we will look at how <strong>Smart Step Into lets us step into methods we&#8217;re actually interested in<\/strong>, some <strong>UI updates that help reduce mental context switches<\/strong> while debugging, and more!<\/p>\n<p><!--more--><\/p>\n<h2>Smart Step Into is enabled by default<\/h2>\n<p><strong>Debugging is hard. But <a href=\"https:\/\/blog.jetbrains.com\/dotnet\/2017\/12\/05\/smart-step-debugging-rider\/\">Rider\u2019s Smart Step Into feature<\/a> makes it easier!<\/strong> Often, when debugging, we have multiple expressions in a single line of code, and it\u2019s hard to tell which statement is executing and when.<\/p>\n<p><strong>Smart Step Into<\/strong> allows you to debug expressions while remaining on a line of code, without having to leave that line to see what\u2019s going on. This is <strong>now enabled by default!<\/strong><\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25043\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-smart-step.png\" alt=\"Smart step\" width=\"700\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-smart-step.gif\" \/><\/p>\n<p>Note this setting is configurable at <strong>Build, Execution, Deployment | Debugger | Stepping | .NET Languages | Always do Smart Step Into<\/strong>.<\/p>\n<h2>Method breakpoints<\/h2>\n<p>Rider now offers <strong>Method Breakpoints<\/strong> so you can break at the first execution of a method, with options to suspend, log, stack trace, and more. Use <kbd>Ctrl+Alt+B<\/kbd>\/<kbd>\u2318+\u2325+B<\/kbd> to show breakpoints, then <kbd>Ctrl+N<\/kbd>\/<kbd>Cmd+N<\/kbd> to add a method breakpoint (or any kind).<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25028\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-method-breakpoints.png\" alt=\"Add method breakpoint\" width=\"688\" data-gif-src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-method-breakpoints.gif\" \/><\/p>\n<h2>Thread name display<\/h2>\n<p>Though you use easy-to-read and descriptive variable names, it doesn&#8217;t help much when thread variable names don&#8217;t show up in debugging or analysis tools.\u00a0For those writing multi-threaded code, you can now easily check out <strong>which thread is displayed on the execution line<\/strong>.<\/p>\n<p>Threads are assigned a number by default, but those who set the <strong>name of their threads<\/strong> will welcome that it&#8217;s now<strong>\u00a0easy to see which thread is currently executing<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25030\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-thread-name.png\" alt=\"display thread name \" width=\"700\" \/><\/p>\n<h2>Debugger window\u00a0changes<\/h2>\n<p>There have been a few changes made to the <strong>Debugger<\/strong> tool window. As you can see in the following image, threads have been incorporated into the window in a more seamless manner. If threads are named, the names show in addition to the thread&#8217;s id.<\/p>\n<p>Instead of showing a separate tab for threads, there is a <strong>quick access button along the left side for toggling the threads view<\/strong>, rather than threads view being visualized in a separate tab. Additionally, there\u2019s a tool <strong>button located on the left side for detaching from processes<\/strong>, and a filter to hide or show frames.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-25031\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2020\/04\/dotnet-2020-debugger-new-view.png\" alt=\"New debugger view\" width=\"700\" \/><\/p>\n<h2>Check out these other great features<\/h2>\n<p>Rider now has the ability to detach from processes initially started with the debugger, without terminating the app (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RIDER-3800\" target=\"_blank\" rel=\"noopener\">RIDER-3800<\/a>). This way, we don&#8217;t have to restart our application when we just wanted to detach the debugger.<\/p>\n<p>You can now also execute the <strong>Skip to Here\/Cursor<\/strong> action after stopping the debug session on an exception.<\/p>\n<p>Some other updates:<\/p>\n<ul>\n<li>It&#8217;s possible to disable service messages in <strong>Debug Output<\/strong>\u00a0(<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RIDER-16641\" target=\"_blank\" rel=\"noopener\">RIDER-16641<\/a>).<\/li>\n<li>Fixed \u2013 stepping into explicitly implemented methods (<a href=\"https:\/\/youtrack.jetbrains.com\/issue\/RIDER-10014\" target=\"_blank\" rel=\"noopener\">RIDER-10014<\/a>).<\/li>\n<li>The debugger supports the .NET Core x86 runtime.<\/li>\n<li>Minor bug fixes and enhancements.<\/li>\n<\/ul>\n<p>We know some of you have been patiently waiting for Data Breakpoints. We\u2019re expecting Data Breakpoints for .NET Core to be available in version 2020.2.<\/p>\n<p>If you want to try out all these great debugging features, <strong><a href=\"https:\/\/www.jetbrains.com\/rider\/\" target=\"_blank\" rel=\"noopener\">Rider 2020.1 is here, download it now<\/a>!<\/strong><\/p>\n","protected":false},"author":901,"featured_media":18565,"comment_status":"open","ping_status":"open","template":"","categories":[1401],"tags":[1969,264,1978],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/dotnet\/18562"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/dotnet"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/dotnet"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/901"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=18562"}],"version-history":[{"count":0,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/dotnet\/18562\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/18565"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=18562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=18562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=18562"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=18562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}