Myrna  Zulauf

Myrna Zulauf

1622600024

Visual Studio Toolbox Live - Debug & Analyze Dump Files in Visual Studio

Not sure what to do when an unexpected crash occurs in your application? Try opening a memory dump file! Join us in a live show with Mark Downie where we’ll explore dump files, when to use one, and how to debug one using analyzers.

Featuring: Leslie Richardson (@lyrichardson01), Mark Downie (@poppastring)

Get your questions answered on the Microsoft Q&A for .NET - https://aka.ms/dotnetqa

Learn .NET with free self-guided learning from Microsoft Learn: http://aka.ms/learndotnet

#vscode #developer

What is GEEK

Buddha Community

Visual Studio Toolbox Live - Debug & Analyze Dump Files in Visual Studio
Juanita  Apio

Juanita Apio

1618243440

[Guest post] Learn C# with Visual Studio, Visual Studio for Mac, and Unity

UPDATE: The book giveaway challenge is complete. We will be announcing winners on the Visual Studio blog within the next week. Thank you for your submissions!

Visual Studio is an amazing development tool. But Visual Studio and Visual Studio for Mac are more than just intuitive, state-of-the-art development environments. They’re also remarkably powerful learning and exploration tools, with features to help you create and understand your code. I love teaching and learning about C## with Visual Studio. That’s why my co-author, Jenny Greene, and I put Visual Studio and Visual Studio for Mac right at the center of our latest book, _Head First C# _(4th edition), published by O’Reilly Media. _Head First C# _incorporates Visual Studio directly in the learning. combining Visual Studio with the unique and innovative “brain-friendly” Head First approach to teaching helps us make learning C## easier and more fun for our readers.

#visual studio #c# #unity #visual studio 2019 for mac #visual studio for mac

Brain  Crist

Brain Crist

1595322866

How Do I Debug Async Code in Visual Studio?

In a recent post, we explored the basics of asynchronous code, why it’s important, and how to write it in C#. However, while it can improve your program’s overall throughput, async code is still not exempt from bugs! Writing async code makes debugging more difficult when potential deadlocks, vague error messages, and finding which task(s) are causing a bug are thrown into the mix. Luckily, Visual Studio has several new and old features compatible with managed, native, and JavaScript to help ease your frustrations with debugging async code. Let’s take a tour!

Where can I see all my program’s tasks?

When you encounter a bug in your async code, you probably want to identify all your Tasks and determine which of them are causing the error. If you’ve debugged multithreaded applications, you may be familiar with the **Threads **window. Good news, there’s also equivalent window for tasks! The **Tasks **window allows you to view all your tasks, displaying their IDs, current locations, the method originally passed into each of them, and their current statuses (active, scheduled, blocked, or deadlocked) at break time. If your program is multithreaded, this window will also display the threads running each task. This can help to identify specific threads which may also be contributing to an issue.

You can access the **Tasks **window at **Debug > Windows > Task **or by using CTRL+SHIFT+D, K.

Tasks window

Tasks window

How can I locate the origin of a thrown exception in my async code?

Determining a thrown exception’s original location is frustrating when debugging async code. When an exception is thrown multiple times, Visual Studio typically returns the call stack where the exception was most recently thrown via the Exception Helper. Unfortunately, this isn’t always helpful for async debugging. To fix this, we’ve implemented rethrown exceptions in 16.4. With this update, the Exception Helper displays the original call stack when an exception is rethrown. To learn more about this new feature, check out Andy Sterland’s blog post.

Rethrown exception example

Rethrown exception example

Is there a way to better visualize tasks and async code flow?

For a graphical depiction of async code’s execution, Visual Studio has the **Parallel Stacks **window for threads and tasks. Improved for Visual Studio 16.6, the Parallel Stacks window for tasks (or **Parallel Tasks **window) visually displays active, awaiting, and scheduled tasks and how they relate to each other. Double-clicking an active or awaiting task shows the async call stack in the Call Stack window. To understand which thread is running a specific task, you can swap between the Parallel Threads and Parallel Tasks windows. You can do this by right-clicking and selecting **Go To Thread **in the context menu. To learn more about the new updates made to **Parallel Tasks in 16.6, **stay tuned for an upcoming blog post…

Parallel Stacks for Tasks window

Parallel Stacks for Tasks window

Ready to use these tools to debug your async code?

Now that you have more tools in your belt to help you debug your code, share your feedback with us! Reaching out with your thoughts and feature suggestions will help us create the best async debugging experience.

#visual studio #.net #async #asynchronous #debugging and diagnostics #tips and tricks #visual studio 2019

Brain  Crist

Brain Crist

1596975120

Writing Visual Studio Extensions with Mads - Episode 1: Item Templates

Join Mads Kristensen from the Visual Studio team each week as he builds extensions for Visual Studio live!

#visual studio code #visual studio #code #microsoft #visual studio extensions

Brain  Crist

Brain Crist

1595337660

Visual Studio 2019 v16.7 Preview 2 Available Today!

C++ Updates

Visual Studio v16.7 Preview 2 delivers various improvements in the C++ space. Within the Connection Manager, you’re now able to edit remote SSH connections, e.g. if the IP address of your target system changes and needs to be updated. You’re also able to set default remote connections to be consumed via **${defaultRemoteMachineName} **in CMakeSettings.json and launch.vs.json.

When you edit a remote connection, Visual Studio will no longer need to recopy headers to Windows for a native IntelliSense experience. Likewise, setting default remote connections is useful for checking CMakeSettings.json and launch.vs.json into source control with no user or machine-specific information. These remote connections over SSH allow you to build and debug your C++ projects on a remote Linux system directly from Visual Studio.

CPP Add or Remove SSH Connections

C++ Add or Remove SSH Connections with Connection Manager

This release also brings enhanced IntelliSense support for Clang on Windows (clang-cl) in Visual Studio. The clang include path now includes the clang libraries, we’ve improved the display of in-editor squiggles (particularly when using the std library), and we’ve added support for C++2a is supported in clang mode.

The Preview release also contains four new code analysis rules to incorporate additional safety features into C++: C26817C26818C26819, and C26820. Please see the C++ Team Blog for more info.

In addition, new C++20 Standard Library features have been implemented. A detailed list is provided in the STL Changelog on GitHub.

.NET Productivity

Quick Info now displays the diagnostic ID along with a help link where you can easily navigate to our documentation to learn more about warnings and errors in your code.

Diagnostic ID with help links in .NET Productivity

Diagnostic ID with help links in .NET Productivity

Git Productivity

We continue to release more Git functionality in Visual Studio 2019. This time we focus on merge conflict resolution. We’ve revamped the Visual Studio merge editor by decoupling it from TFVC and focusing it on Git.

A new gold info bar at the top of a file will tell you when there are merge conflicts that need to be manually resolved. Clicking will take you to the merge editor, which now has more informative tiles and captions to help you distinguish between the conflicting branches. We’ve reduced the clutter around the zoom margin, health margin, and the toolbar. In addition, it is easier to parse conflicts with aligned matching lines, word level differences, and visible whitespace when it is the only difference. You can turn off non-conflicting differences to just focus on the conflicts. You can also resolve add/add conflicts at the file level now with a two-way merge. Finally, we have added a checkbox to resolve all conflicts on one side or the other with a single click.

Try the new features by toggling the Preview Feature for New Git user experience in Tools > Options.

Improved Git Functionality in Visual Studio 2019 under the Tools Menu

Improved Git Functionality in Visual Studio 2019 under the Tools Menu

In other Git improvements, we will now close any open folders or solutions before starting a new clone operation, so that Visual Studio can open the newly cloned repo to help you get to your code faster. We’ve improved upon the commit text box, adding inline error checking. And we’ve added UI to help you more clearly understand what is happening when you initialize and push a repository to a remote host like GitHub or Azure Repos.

Local Process with Kubernetes

Local Process with Kubernetes allows you to write, test and debug your .NET code on your development workstation while connected to your Kubernetes cluster with the rest of your application or services. By connecting your development workstation to your cluster, you eliminate the need to manually run and configure dependent services on your development machine. Environment variables, connection strings and volumes from the cluster are available to your microservice code running locally.

For more information on Local Process with Kubernetes, we have detailed it out in our team blog.

#visual studio #announcement #visual studio 2019 #visual studio code

Myrna  Zulauf

Myrna Zulauf

1622600024

Visual Studio Toolbox Live - Debug & Analyze Dump Files in Visual Studio

Not sure what to do when an unexpected crash occurs in your application? Try opening a memory dump file! Join us in a live show with Mark Downie where we’ll explore dump files, when to use one, and how to debug one using analyzers.

Featuring: Leslie Richardson (@lyrichardson01), Mark Downie (@poppastring)

Get your questions answered on the Microsoft Q&A for .NET - https://aka.ms/dotnetqa

Learn .NET with free self-guided learning from Microsoft Learn: http://aka.ms/learndotnet

#vscode #developer