{"id":33113,"date":"2021-06-01T14:56:39","date_gmt":"2021-06-01T21:56:39","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/dotnet\/?p=33113"},"modified":"2021-06-01T14:56:39","modified_gmt":"2021-06-01T21:56:39","slug":"announcing-visual-studio-code-extension-for-tye","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/dotnet\/announcing-visual-studio-code-extension-for-tye\/","title":{"rendered":"Announcing Visual Studio Code extension for Tye"},"content":{"rendered":"<p>We are excited to announce the availability of our <a href=\"https:\/\/aka.ms\/vscode-tye\">Visual Studio Code Tye extension<\/a>, which makes it easier to view, run, and debug applications that are using <a href=\"https:\/\/github.com\/dotnet\/tye\">Tye<\/a> from within Visual Studio Code.<\/p>\n<p>This is a continuation of the <a href=\"https:\/\/github.com\/dotnet\/tye\">Tye<\/a> experiment, where we are learning what the best cloud-native tooling experiences could be. Tye is a developer tool that makes developing, testing, and deploying microservices and distributed applications easier. If you haven&#8217;t tried Tye yet, give it a try with the help of the <a href=\"https:\/\/github.com\/dotnet\/tye\/blob\/main\/docs\/getting_started.md\">getting started guide<\/a>.<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/vscode-tye\" target=\"_blank\">Download Visual Studio Code Tye extension<\/a><\/div><\/p>\n<h2>View and manage your Tye application<\/h2>\n<p>The VS Code extension makes it easier to initialize, run, view, and manage your Tye application from within VS Code. As you can see in the video below, the services are displayed in the Tye Explorer as soon as the Tye application is up and running.<\/p>\n<p>From the explorer, you can view the logs for any of your services, browse to services that have accessible endpoints, and even attach a debugger to any of the .NET services! We have also included a link that lets you quickly navigate to the browser-based Tye dashboard that you may already know and love.<\/p>\n<figure class=\"video_container\"><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/-UQau95Fz6U\" allowfullscreen><\/iframe><\/figure>\n<h2>Debug the Tye application like a pro<\/h2>\n<p>The extension provides flexibility to support various debugging scenarios with the ability to run your Tye application without debugging, or to debug all or a subset of services.\nThe extension also allows you to debug the services in <code>watch<\/code> mode where the debugger will watch for any code changes and reattach to the process to allow you to continue debugging without restarting your app.<\/p>\n<blockquote><p><strong>Note:<\/strong>\nDebugging your Tye application requires a Tye-specific task and launch configuration. The extension helps you scaffold the default task and launch configuration with the <strong>Tye: Scaffold Tye Tasks<\/strong> command as described in the <a href=\"#scaffold-tye-tasks-with-ease\">section below<\/a>.<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/05\/2-breakpoint.png\" alt=\"Debugging with the Tye extension\" \/><\/p>\n<h3><\/h3>\n<h3>Attach the debugger to already running services<\/h3>\n<p>The extension offers attaching the debugger to already running project-based services. To attach the debugger to all project-based services, open <strong>Tye Explorer<\/strong> and click on the <strong>Debug<\/strong> icon located next to the section <strong>Tye Services<\/strong>.<\/p>\n<p>Alternatively, to debug a single service, select the replica of the service you want to debug, and click on the <strong>Attach<\/strong> button located next to the name of the replica.<\/p>\n<figure class=\"video_container\"><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/cupggY6qJ0w\" allowfullscreen><\/iframe><\/figure>\n<p>&nbsp;<\/p>\n<h3>Debug with Tye configuration<\/h3>\n<p>The extension offers debugging multiple services with the help of the <strong>Debug with Tye<\/strong> launch configuration. The default scaffolded configuration attaches the debugger to all project-based services, but you can configure it to attach to only a subset of services. To debug multiple services, with the <strong>Debug with Tye<\/strong> debug configuration selected you can just press (<kbd>F5<\/kbd>).<\/p>\n<figure class=\"video_container\"><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/t1Lz_rvT8Kg\" allowfullscreen><\/iframe><\/figure>\n<p>To debug a subset of services, open the file <em>.vscode &gt; launch.json<\/em>, and edit the <strong>Debug with Tye<\/strong> configuration to add the property <code>services<\/code> with value of an array of services that you want to debug.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/05\/5-services.gif\" alt=\"Debug a subset of services\" \/><\/p>\n<h3><\/h3>\n<h3><\/h3>\n<h3>Shorten your developer inner loop by debugging your application in <code>watch<\/code> mode<\/h3>\n<p>The extension supports attaching the debugger in <code>watch<\/code> mode, which watches for code changes and reattaches to the respawned process after the code changes.\nDebugging in <code>watch<\/code> mode enables you to focus on the code-debug loop and not have to restart your app or re-attach the debugger after every code change.<\/p>\n<figure><\/figure>\n<figure class=\"video_container\"><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/MkqB3G4dHdM\" allowfullscreen><\/iframe><\/figure>\n<p>&nbsp;<\/p>\n<p>To attach the debugger in <code>watch<\/code> mode,<\/p>\n<ul>\n<li>Open the file <em>.vscode &gt; tasks.json<\/em> and add the property <code>\"watch\": true<\/code> to the <strong>tye-run<\/strong> task, and<\/li>\n<li>Open the file <em>.vscode &gt; launch.json<\/em> and add the property <code>\"watch\": true<\/code> to the <strong>Debug with Tye<\/strong> launch configuration.<\/li>\n<\/ul>\n<p>Now, debug the application using the <strong>Debug with Tye<\/strong> configuration to see it in action.<\/p>\n<h3><\/h3>\n<h3>Run the Tye application without debugging<\/h3>\n<p>To run the Tye application without attaching the debugger, open the Command Palette (<kbd>F1<\/kbd>), and then type <code>task<\/code>, followed by a <kbd>space<\/kbd> and <code>tye-run<\/code>.<\/p>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/dotnet\/wp-content\/uploads\/sites\/10\/2021\/05\/7-tye-run.gif\" alt=\"Run the Tye application without debugging\" \/><\/p>\n<h2><\/h2>\n<h2>Scaffold Tye tasks with ease<\/h2>\n<p>The extension offers commands to scaffold the task and launch configuration to run and debug the Tye application. Open the Command Palette (<kbd>F1<\/kbd>), and use the <strong>Tye: Scaffold Tye Tasks<\/strong> command to scaffold:<\/p>\n<ul>\n<li>The <strong>tye-run<\/strong> task which you can use to run your Tye application without leaving VS Code.<\/li>\n<li>The <strong>Debug with Tye<\/strong> configuration which enables you to debug services in your Tye application.<\/li>\n<\/ul>\n<p><iframe src=\"\/\/www.youtube.com\/embed\/GgX5aehndkU\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<h2>Help our experiment by sending us your feedback<\/h2>\n<p>Your bug reports and suggestions are very important to us as we continue to learn about the problems you have and how close Tye is to solving them \u2013 please keep those suggestions and problem reports coming!<\/p>\n<p>You can report issues about Tye by opening an issue on GitHub at <a href=\"https:\/\/github.com\/dotnet\/tye\/issues\">dotnet\/tye<\/a>\u00a0and you can report issues about the extension by clicking on the <strong>Report Issue<\/strong> button in the <strong>Help and Feedback<\/strong> section or opening an issue on GitHub at <a href=\"https:\/\/github.com\/microsoft\/vscode-tye\">vscode-tye<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<h2><\/h2>\n<h2>Download the Visual Studio Code extension for Tye today!<\/h2>\n<p>We hope you enjoy the Visual Studio Code extension for Tye as much as we enjoy working on it!<\/p>\n<p>You can download the extension from the Visual Studio Code extensions marketplace by opening the <strong>Extensions<\/strong> view in VS Code and searching for <strong>Tye<\/strong> or by clicking the button below.<\/p>\n<p>&nbsp;<\/p>\n<p><div  class=\"d-flex justify-content-center\"><a class=\"cta_button_link btn-primary mb-24\" href=\"https:\/\/aka.ms\/vscode-tye\" target=\"_blank\">Download Visual Studio Code Tye extension<\/a><\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Announcing the availability of Visual Studio Extension for Tye<\/p>\n","protected":false},"author":8882,"featured_media":33114,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[196,7196],"tags":[],"class_list":["post-33113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-dotnet-core","category-debugging"],"acf":[],"blog_post_summary":"<p>Announcing the availability of Visual Studio Extension for Tye<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/users\/8882"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/comments?post=33113"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/posts\/33113\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media\/33114"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/media?parent=33113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/categories?post=33113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/dotnet\/wp-json\/wp\/v2\/tags?post=33113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}