Posted in

ReSharper 2024.2 EAP 5:重要的里程碑和其他更新 | .NET 工具博客_AI阅读总结 — 包阅AI

包阅导读总结

1. 关键词:

ReSharper 2024.2 EAP 5、异步打字、C++23、代码重构、动态程序分析

2. 总结:

本文介绍了 ReSharper 2024.2 EAP 5 的重要更新,包括首次实现异步打字以改善性能,支持 C++23 多维下标运算符,C提取公共代码重构,以及在解编译器、dotTrace、dotMemory 和动态程序分析工具窗口的改进。

3. 主要内容:

– ReSharper 2024.2 EAP 5 发布

– 异步打字启用,改善与 Visual Studio 协同工作的性能

– 支持 C++23 多维下标运算符,简化多维数组元素访问语法

– C提取公共代码重构,优化分支语句中的逻辑

– 解编译器增强,增加在浏览器中打开的操作,可导航至 GitHub 和 NuGet 包仓库

– dotTrace 解决时间轴模式中内核采样事件缺失问题,Viewer 工具窗口在 macOS 和 Linux 可用

– dotMemory 在 Linux 和 macOS 新增自动内存检查和跨工作区快照比较功能,Rider 内置插件也可用

– 动态程序分析工具窗口新增 AI 解释按钮,帮助解决内存和数据库问题

思维导图:

文章地址:https://blog.jetbrains.com/dotnet/2024/07/01/resharper-2024-2-eap-5/

文章来源:blog.jetbrains.com

作者:Sasha Ivanova

发布时间:2024/7/1 16:55

语言:英文

总字数:814字

预计阅读时间:4分钟

评分:86分

标签:.NET 工具,早期访问计划,发布,ReSharper,平台


以下为原文内容

本内容来源于用户推荐转载,旨在分享知识与观点,如有侵权请联系删除 联系邮箱 media@ilingban.com

.NET ToolsEarly Access ProgramReleasesReSharper Platform

ReSharper 2024.2 EAP 5: An Important Milestone and Other Updates

The latest installment in the Early Access Program for ReSharper 2024.2 has just been released! This preview build marks an important milestone – it is the first one to feature asynchronous typing, an important design change for ReSharper on its way to out-of-process operation. In addition to that, the update also brings several updates across C++ support, C# refactoring, the decompiler, dotTrace, dotMemory, and the Dynamic Program Analysis (DPA) tool window.

Let’s dive in!

Asynchronous typing enabled

Asynchronous typing is part of an ongoing effort to improve ReSharper’s performance by enabling it to run out of process with Visual Studio. ReSharper 2024.2 EAP 5 is the first build to feature this important change.

Traditionally, ReSharper used a synchronous model for handling user inputs. Each keystroke would trigger a series of actions requiring ReSharper to obtain a write lock, pause background processes, and then synchronize its internal model with what is displayed in the Visual Studio editor. This process, although typically quick, could introduce noticeable delays, especially in complex scenarios where extensive code analysis and formatting were needed.

The shift to asynchronous typing decouples these operations from the main typing process. By doing so, ReSharper can handle input in the Visual Studio editor without waiting for background tasks to complete. This change reduces the blocking time for write lock, thereby minimizing interruptions and improving the responsiveness of the editor.

Our internal tests show a marked improvement in the smoothness of the typing experience. We’d love to hear about your perceptions over on our issue tracker. While we’re optimistic about enabling async typing for the 2024.2 release, further testing is still needed, and that’s why your feedback is particularly important.

Support for the C++23 multidimensional subscript operator

The latest build introduces support for the C++23 multidimensional subscript operator. Previously, accessing elements in a multidimensional array required either chaining multiple subscript operators (e.g. arr[i][j][k]) or using function call syntax (e.g. arr(i, j, k)), both of which could be cumbersome and less readable.

With the new C++23 feature, you can now use a single subscript operator with multiple indices (e.g. arr[i, j, k]). This change simplifies the syntax and makes the code more readable and consistent with how single-dimensional arrays are accessed, thereby reducing the cognitive load.

Extract common code refactoring for C#

ReSharper’s latest refactoring enhancement enables you to extract common code out of branching statements such as if or switch. This update streamlines and consolidates shared logic, ensuring it is executed regardless of the branching path, improving code readability, and reducing redundancy.

Decompiler enhancements

The decompiler in ReSharper 2024.2 EAP 5, as well as the standalone dotPeek application, sees another usability improvement with the introduction of the Open in Browser action. This action provides two navigation options:

  • Navigate to GitHub: You can now open external sources directly in your browser and navigate to the source repository on GitHub. This is accessible via the context menu in the Assembly Explorer or within the code.
  • Navigate to the NuGet package repository: Similarly, you can navigate to the NuGet package repository directly from the context menu on the NuGet node. This seamless integration saves time and enhances your workflow by providing quick access to source code and documentation.

dotTrace

  • We have resolved the issue with missing kernel sampling events in Timeline mode (DTRC-30949).
  • The View | Options tool window is now available in the dotTrace Viewer on macOS and Linux. Settings like Web Proxy, Call Tree Folding, Subsystems, and Source View can be configured.

dotMemory

The dotMemory version for Linux and macOS gets features that were previously available only on Windows:

  • Automatic memory inspections: dotMemory for Linux and macOS gets the Inspections view, which shows a number of automatically detected memory issues.
  • Cross-workspace snapshot comparison: Now, you can compare snapshots from different profiling sessions, allowing for a more comprehensive memory analysis and comparison of snapshots contained in different dotMemory workspaces.

These features are also available in the built-in dotMemory plugin in JetBrains Rider.

Explain with AI for Dynamic Program Analysis tool window

The Dynamic Program Analysis (DPA) tool window now features an Explain with AI button for issues related to memory allocation and database problems. This AI-driven feature offers detailed explanations and advice from AI Assistant on potential fixes directly within the Dynamic Program Analysis tool window to help you quickly understand and resolve even the most complex issues associated with memory allocation and working with databases.

For the full list of changes included in this build, please refer to our issue tracker.

As always, we’re happy to hear your thoughts on the latest updates in the comments section or on our social media. Please feel free to submit any issues you encounter to our issue tracker.

Subscribe to a monthly digest curated from the .NET Tools blog: