GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing docs.servicestack.net — Debugging DebuggingSourceLink Enabled PackagesTo maximize the debuggability of ServiceStack packages all ServiceStack projects utilize MSBuild generated NuGet packages where all packages are embed pdb symbols and are configured with support for SourceLink to improve the debugging experience of ServiceStack Apps as source files can be downloaded on-the-fly from GitHub as you debug. Scott Hanselman has written a nice post on Source Link and how it can be enabled inside VS.NET by turning on Enable source link support: When enabled it should let you debug into the ServiceStack framework implementation, downloading the correct source files version from GitHub as and when needed. All ServiceStack GitHub projects use CI NuGet feedIn addition to using MSBuild generated packages all projects also utilize CI NuGet package feeds for external dependencies instead of copying
.dll's in The pre-release packages are still published using the same version number so if you get a build error from having a cached stale package you'll need to clear your local packages cache to download the latest build packages from the CI NuGet packages feed. Linking to Source projectsIn order to get the best source-based development experience using the latest version of ServiceStack in your Projects, clone the ServiceStack Repos you want to use:
Then reference the This approach is used in our Test.csproj allowing us to debug directly into ServiceStack library source code just like any other project reference in our solution. Alternatives Debugging SolutionsGitLink is another solution for debugging source code in NuGet packages. Otherwise the most reliable solution for debugging ServiceStack source code is to download the source code for the release on Github you want to debug, build the VS.NET Solution locally using Debug configuration then change your ServiceStack references to use your local .dll. ConfigurationDebugModeServiceStack allows additional debug information when in DebugMode, which is automatically set by default in Debug builds or explicitly with:
In addition, users with the Admin role or Requests with an AuthSecret can also view Debug Info in production. StrictModeYou can configure Strict Mode in ServiceStack to enforce stricter behavior and have it throw Exceptions when it sees certain failure conditions. To enable Strict Mode across all libraries use:
Otherwise to just enable StrictMode for ServiceStack:
When enabled ServiceStack will perform runtime checks to catch invalid state, currently:
Admin RoleUsers in the AuthSecretYou can use Config.AdminAuthSecret to specify a special string to give you admin access without having
to login by adding
By-pass protected services using query string:
AuthSecret HttpHeaderIn addition to authsecret QueryString, FormData or Cookie, it can also be sent with any request with the
Or it can be sent in the Debug LinksTo provide better visibility to the hidden functionality in ServiceStack we've added Debug Info links
section to the
The Debug Links section is only available in DebugMode. You can add links to your own Plugins in the metadata pages with:
Startup ErrorsWhen plugins are registered their Exceptions are swallowed and captured in Alternatively enable StrictMode to have StartUp Exceptions thrown on StartUp. Debug InspectorAll ServiceStack Apps have access to rich introspection and queryability for inspecting remote ServiceStack instances with the new Debug Inspector. The Debug Template is a Service in
This registers the Service but limits it to Users with the
Which will let you access it by appending the authsecret to the querystring: Alternatively if preferred you can make the Debug Template Service available to:
Which is the configuration that allows sharpscript.net/metadata/debug to be accessible to anyone. Lisp TCP Repl ServerA even greater way to get deeper insights into a Live running remote ServiceStack App is to open a Lisp TCP REPL Server into the server to open a "programmable gateway" into any ServiceStack App where you're able to perform live queries, access IOC dependencies, invoke internal Server functions and query the state of a running Server to provide invaluable insight when diagnosing issues on a remote server. YouTube Request InfoServiceStack's Request Info feature is useful for debugging requests. Just add ?debug=requestinfo
in your To better highlight the presence of Startup Errors a red warning banner will also appear in
The number of Startup Errors is also added to the If you prefer that any Plugin Exception is immediately visible you can register this callback in your
PluginsThere are a number of plugins that can help with debugging: Request LoggerAdd an In-Memory
The
It supports multiple queryString filters and switches so you filter out related requests for better analysis and debuggability:
The RequestLogsService is just a simple C# service under-the-hood but is a good example of how a little bit of code can provide a lot of value in ServiceStack's by leveraging its generic, built-in features. On This Page
|
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |