RemoteDebug 1.0.0

dotnet add package RemoteDebug --version 1.0.0
NuGet\Install-Package RemoteDebug -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="RemoteDebug" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add RemoteDebug --version 1.0.0
#r "nuget: RemoteDebug, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install RemoteDebug as a Cake Addin
#addin nuget:?package=RemoteDebug&version=1.0.0

// Install RemoteDebug as a Cake Tool
#tool nuget:?package=RemoteDebug&version=1.0.0

本项目最主要的是两个方法:

  • IServiceCollection的拓展方法ListeningRemoteDebug
  • IApplicationBuilder的拓展方法OpenRemoteDebug

用法:

在远程(部署)环境中使用,该环境扮演着参数转发者的角色

  • 在Startup.cs的Configure方法中调用OpenRemoteDebug打开远程调试,需要的参数如下
   app.OpenRemoteDebug(setting =>
           {
               setting.SecretKey = "1234";
               setting.IgnoredEndpoint = new System.Collections.Generic.List<string>
               {
                     "/index.html",
                     "/swagger/v1/swagger.json",
                     "/favicon.ico"
               };
           });

参数说明

  • SecretKey是指定连接者需要提供的密钥,这是一个安全措施,避免谁都能连接
  • IgnoredEndpoint 是指定需要过滤的路由,并不是所有请求进来之后都需要转发的,这里可以做一个过滤的配置

在本地(开发)环境中使用,该环境扮演者参数接收者的角色

  • 在Startup.cs的ConfigureServices方法中调用ListeningRemoteDebug监听远程环境接收到的请求,需要的参数如下:
     services.ListeningRemoteDebug(listeningSetting =>
            {
                listeningSetting.LocalUrl = "http://localhost:5001";
                listeningSetting.RemoteUrl = "http://www.baidu.com";
                listeningSetting.SecretKey = "1234";
            });

参数说明

  • LocalUrl本地环境的地址
  • RemoteUrl远程环境的地址
  • SecretKey远程环境需要提供的密钥
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.2 is compatible.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 333 2/5/2021