Practical Debugging for .NET Developers book review

Nobody wants to waste unnecessary time on debugging and the recently published “Practical Debugging for .NET Developers: Tools and Techniques to debug and solve real-world problems in .NET” book by Michael Shpilt will arm you with tools, techniques and ideas to efficiently solve the most difficult problems:

You may have used Visual Studio debugger for many years, but even there are options you probably don’t know, for example helpful to debug optimized code or process dumps. Then there are less frequently used tools like dnSpy and dotPeek that you will learn more about. And then there are powerful, scary looking tools like WinDbg and PerfView that you will no longer be afraid to use at the right time.

Each bug is unique, but debugging is more science than art and the book provides a set of principles for successful problem solving, and by using these principles you’re going to fix bugs fast and with confidence.

You’ll see what causes crashes to happen, what information you can gather when they do, and how to debug that information to solve the problem. Learn about desktop hangs and web hangs. Will see how garbage collection works, what kind of memory problems can occur, how to deal with them, and how to prevent them in the first place. When to worry about performance, which are the best tools to analyze performance issues and the best way to find their root causes. Will see how to debug optimized code without symbols and source code – how to achieve a fully interactive debugging experience being able to stop on breakpoints, step over code, see variable values, and break on exceptions.

The target audience of this book is intermediate to experienced .NET developers and is all about perfecting your debugging skills, saving you time, and increasing your productivity. You can order it from the official site https://practicaldebugging.net/ along with video lessons and code samples. Happy reading and problem solving!

Posted in Reviews | Leave a comment

Find and discuss extensions for Visual Studio 2019

Join the new VisualStudioExtensions Gitter chat room to discuss existing extensions and ask for new functionality.

Posted in Visual Studio news | Leave a comment

Timeline of your application execution

Runtime Flow in real time monitors and logs function calls and function parameters in a running .NET application and shows a stack trace tree.

v2.1.0 adds the new Timeline window that shows local time when a function call started with 0.1 ms accuracy, the [thread id] and the function name with parameters and a return value:

This log was captured after running the following program (original source):

static void Main()
{
    while (true)
    {
        // Start computation.
        Example();
        // Handle user input.
        string result = Console.ReadLine();
        Console.WriteLine("You typed: " + result);
    }
}
 
static async void Example()
{
    // This method runs asynchronously.
    int t = await Task.Run(() => Allocate());
    Console.WriteLine("Compute: " + t);
}
 
static int Allocate()
{
    // Compute total count of digits in strings.
    int size = 0;
    for (int z = 0; z < 100; z++)
    {
        for (int i = 0; i < 100000; i++)
        {
            string value = i.ToString();
            size += value.Length;
        }
    }
    return size;
}

With monitoring filter set to “Module == test_timeline.exe || Function == WriteLine || Class == System.Threading.Tasks.Task”.

In the log you can see:

  • a state machine created for the async Example function,
  • Example function returned when a parallel thread [3696] was started to perform the Allocate computation,
  • Allocate returned 588889000 and took 8.5 seconds for the calculation,
  • WriteLine(“Compute: 588889000”) executed on the background thread where the Allocate computation was performed,
  • second example calculation started in another parallel thread [11396] right after the “test” string was typed.

Download the latest installer from VlasovStudio.com/runtime-flow/.

Posted in Vlasov Studio tools | Tagged | Leave a comment

Tabs Studio v4.7.0 adds support for integrated vertical tabs in VS 2019 v16.4

Tabs Studio is a Visual Studio and SSMS extension empowering you to work comfortably with any number of open documents.

v4.7.0 adds support for integrated vertical tabs in VS 2019 v16.4. More specifically, when vertical tabs are activated in VS 2019, Tabs Studio reuses this area to show tabs, instead of showing them in a separate tool window:

See the full what’s new list. Download the installer.

Posted in Vlasov Studio tools | Tagged , | Leave a comment

Continuous Formatting adds support for TypeScript and JavaScript

Continuous Formatting extension automates C# and C++ code formatting in Visual Studio. It removes the necessity to format code manually, arranging code continuously as you type and make changes.

v2.1.2 adds support for TypeScript and JavaScript.

Download the installer.

Posted in Uncategorized | Leave a comment

Vertical tabs in Visual Studio 2019 16.4 Preview 2

The latest Visual Studio 2019 preview, released yesterday, adds the vertical tabs layout option to the core product:

You can select it in options or right clicking a tab:

In the options you can now additionally select Alphabetical tab sorting (works only for vertical tabs).

There is a scroller when all tabs don’t fit and if the active tab is not visible in the list, its name is displayed in the top right corner:

If you organize several editor windows side by side, tab groups are displayed one below other:

Pinned tabs are displayed on the top and you can freely change tabs area width by dragging the separator:

Alternative tab managers like Tabs Studio and Custom Document Well continue to work as usual if you keep the tab layout option set to the default Top value.

Download Visual Studio Preview to try it for yourself.

Posted in Reviews, Visual Studio news | Tagged | Leave a comment

HTML 11 – A Browser Link alternative for Visual Studio 2017/2019

Pressing F5 in a browser to see web page changes is not a big deal. But it is a context switch nevertheless, breaking your flow. And it becomes progressively irritating when you edit multiple pages or want to see them in multiple browsers.

Browser Link is a Visual Studio feature to refresh your web application in several browsers at once just pressing Ctrl+Alt+Enter without leaving the editor:

The recently developed HTML 11 extension offers a different approach to show static and dynamic web pages you are currently editing. The preview is displayed in a Visual Studio tool window using embedded Chromium framework:

Read the full article…

Posted in Vlasov Studio tools | Tagged , , , | Leave a comment

Mobile HTML preview in Visual Studio 2019

HTML 11 extension provides tool windows in Visual Studio 2017/2019 showing preview of an HTML document you are currently editing, on desktop and mobile devices:

The preview is updated as you type. When you change a .css or a .js file referenced in the HTML document, the preview is updated after you save the referenced file.

To initially open HTML 11 tool windows, select Desktop preview or Mobile preview in the main HTML11 menu:

You can position opened tool windows alongside the HTML editor or outside the main Visual Studio window, e.g. on a second monitor.

In HTML 11 options you can select a mobile device for preview:

HTML is rendered using Chromium Embedded Framework v75. A mobile device is simulated with Chromium DevTools Device Mode.

HTML 11 personal license costs $39/year. Download HTML 11 trial from the official site or Visual Studio Marketplace.

Posted in Vlasov Studio tools | Tagged , , | 5 Comments

HTML preview in Visual Studio 2019

Default HTML editor in Visual Studio 2019 doesn’t include preview. You can select the Web Forms editor with a Design view, but it requires updates as you change code and doesn’t support full modern HTML capabilities.

The new HTML 11 extension for Visual Studio 2017/2019 provides a preview tool window automatically updated as you type and uses Chromium Embedded Framework v75 for HTML rendering:

Read the full article…

Posted in Visual Studio tips, Vlasov Studio tools | Tagged , , | Leave a comment

Linking Files in Visual Studio

Jeremy Clark provides great explanation on how to share a file between different projects.

Posted in Visual Studio tips | Leave a comment