-
Notifications
You must be signed in to change notification settings - Fork 0
1. Getting started guide
Chingiz Olzhabaev edited this page Aug 7, 2023
·
11 revisions
We preperad 2 min video about how to install and use Diol
. Please don't forget to like the video and subscribe to the channel (^_^)
- Open your VS
- Go to
Extensions
->Manage Extensions
- Search
Diol
- Install
- Go to
Views
->Other Windows
->Diol
("IO" icon) - The tool window should be opened
- You can attach it to some place.
- Don't forget to click
Sync
button
Cool, now we are ready to start!
- Create new asp.net core application or use our example link. In the example we will show our sample.
- Add several things (if you created your own app):
- in
Program.cs
->builder.Services.AddHttpClient();
- in
Program.cs
->app.UseHttpLogging();
- in
appsettings.Development.json
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Trace",
"System.Net.Http.HttpClient": "Trace"
},
"EventSource": {
"LogLevel": {
"Default": "None",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Trace",
"System.Net.Http.HttpClient": "Trace"
}
}
}
}
- Run with debug your application
Note
There is a known issue where Visual Studio debugger may cause invalid Activity IDs to be generated. Either don't run this sample under the debugger or set a breakpoint at the beginning of Main and evaluate the expression 'System.Threading.Tasks.TplEventSource.Log.TasksSetActivityIds = false' in the immediate window before continuing to work around the issue.
- Open Diol
- Click
Start
inDiol Tool windows
- Add breakpoint to
/api/process-id
endpoint. - Navigate to swagger page (http://localhost:[<your_port>]/swagger
- Call
GET
/api/process-id
- You should see a new row in 'Aspnet core' tab (Diol tool window)
- Press
Continue debugging
and return toDiol
- You also can click on row and see detail information!
Congrats!
- Add
builder.Services.AddHttpClient();
inprogram.cs
- Update appsettings.development.json
"EventSource": {
"LogLevel": {
"Default": "None",
"System.Net.Http.HttpClient": "Trace"
}
}
- Add in
program.cs
builder.Services.AddHttpLogging(options =>
{
options.LoggingFields = HttpLoggingFields.All;
});
- Add
app.UseHttpLogging();
inprogram.cs
- Update appsettings.development.json
"EventSource": {
"LogLevel": {
"Default": "None",
"Microsoft.AspNetCore.HttpLogging.HttpLoggingMiddleware": "Trace"
}
}
- Add EF to your project
- Update 'appsettings.development.json'
"EventSource": {
"LogLevel": {
"Default": "None",
"Microsoft.EntityFrameworkCore": "Trace"
}
}
- We are working on a solution for
Diol Backend Service
installation process. Until this you should run it once - We are working on a solution to not click
sync
andstart
manually.