Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set razor logging level to Debug in VsCode #11513

Open
soundaranbu opened this issue Feb 19, 2025 · 4 comments
Open

Unable to set razor logging level to Debug in VsCode #11513

soundaranbu opened this issue Feb 19, 2025 · 4 comments
Assignees

Comments

@soundaranbu
Copy link

soundaranbu commented Feb 19, 2025

Issue Description

Hi, I may be missing something very obvious. But I just can't find this setting in Vs Code to set the log level to Debug. This prevents me from filing a issue related to the Razor Hot Reload which is applying the changes but not reloading the browser.

Image

Image

Later I found this PR where I found the settings ID #9142 razor.server.trace. I tried setting it to Debug, but it just can't find the key

Image

Am I missing something here?

Steps to Reproduce

  • Search for Razor logging in vs code settings

Expected Behavior

  • Settings should be shown in vscode to set the log level for razor

Actual Behavior

  • Settings not shown

Logs

C# log

Post the output from Output-->C# here

C# LSP Trace Logs

Post the output from Output-->C# LSP Trace Logs here. Requires the `C#` output window log level to be set to `Trace`

Environment information

VSCode version: 1.97.2
C# Extension: 2.63.32
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 9.0.200 Commit: 90e8b202f2 Workload version: 9.0.200-manifests.c4f6226a MSBuild version: 17.13.8+cbc39bea8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.200\

.NET workloads installed:
[aspire]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

[maui-windows]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 9.0.14/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.14\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 18.2.9173/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.2.9173\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 35.0.39/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.39\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 18.2.9173/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.2.9173\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.2
Architecture: x64
Commit: 80aa709f5d

.NET SDKs installed:
6.0.428 [C:\Program Files\dotnet\sdk]
8.0.309 [C:\Program Files\dotnet\sdk]
8.0.406 [C:\Program Files\dotnet\sdk]
9.0.103 [C:\Program Files\dotnet\sdk]
9.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
azure-pipelines ms-azure-devops 1.249.0 ms-azure-devops.azure-pipelines-1.249.0
copilot GitHub 1.272.0 github.copilot-1.272.0
copilot-chat GitHub 0.24.1 github.copilot-chat-0.24.1
csdevkit ms-dotnettools 1.16.6 ms-dotnettools.csdevkit-1.16.6-win32-x64
csharp ms-dotnettools 2.63.32 ms-dotnettools.csharp-2.63.32-win32-x64
dotnet-maui ms-dotnettools 1.8.9 ms-dotnettools.dotnet-maui-1.8.9-win32-x64
es7-react-js-snippets dsznajder 4.4.3 dsznajder.es7-react-js-snippets-4.4.3
plantuml jebbs 2.18.1 jebbs.plantuml-2.18.1
powershell ms-vscode 2025.0.0 ms-vscode.powershell-2025.0.0
prettier-vscode esbenp 11.0.0 esbenp.prettier-vscode-11.0.0
rainbow-csv mechatroner 3.17.0 mechatroner.rainbow-csv-3.17.0
remote-containers ms-vscode-remote 0.397.0 ms-vscode-remote.remote-containers-0.397.0
remote-wsl ms-vscode-remote 0.88.5 ms-vscode-remote.remote-wsl-0.88.5
service-bus-explorer digital-molecules 0.1.9 digital-molecules.service-bus-explorer-0.1.9
vscode-azure-github-copilot ms-azuretools 0.3.131 ms-azuretools.vscode-azure-github-copilot-0.3.131
vscode-azurefunctions ms-azuretools 1.16.2 ms-azuretools.vscode-azurefunctions-1.16.2
vscode-azureresourcegroups ms-azuretools 0.10.5 ms-azuretools.vscode-azureresourcegroups-0.10.5
vscode-azurestorage ms-azuretools 0.16.2 ms-azuretools.vscode-azurestorage-0.16.2
vscode-bicep ms-azuretools 0.33.93 ms-azuretools.vscode-bicep-0.33.93
vscode-cosmosdb ms-azuretools 0.24.2 ms-azuretools.vscode-cosmosdb-0.24.2
vscode-docker ms-azuretools 1.29.4 ms-azuretools.vscode-docker-1.29.4
vscode-dotnet-pack ms-dotnettools 1.0.13 ms-dotnettools.vscode-dotnet-pack-1.0.13
vscode-dotnet-runtime ms-dotnettools 2.2.8 ms-dotnettools.vscode-dotnet-runtime-2.2.8
vscode-eslint dbaeumer 3.0.10 dbaeumer.vscode-eslint-3.0.10
vscode-pull-request-github GitHub 0.104.1 github.vscode-pull-request-github-0.104.1
vscode-yaml redhat 1.16.0 redhat.vscode-yaml-1.16.0
vscodeintellicode-csharp ms-dotnettools 2.2.3 ms-dotnettools.vscodeintellicode-csharp-2.2.3-win32-x64
vsliveshare ms-vsliveshare 1.0.5948 ms-vsliveshare.vsliveshare-1.0.5948

Issue Description

Steps to Reproduce

Expected Behavior

Actual Behavior

Logs

C# log

Post the output from Output-->C# here

C# LSP Trace Logs

Post the output from Output-->C# LSP Trace Logs here. Requires the `C#` output window log level to be set to `Trace`

Environment information

VSCode version: 1.97.2
C# Extension: 2.63.32
Using OmniSharp: false

Dotnet Information .NET SDK: Version: 9.0.200 Commit: 90e8b202f2 Workload version: 9.0.200-manifests.c4f6226a MSBuild version: 17.13.8+cbc39bea8

Runtime Environment:
OS Name: Windows
OS Version: 10.0.22631
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.200\

.NET workloads installed:
[aspire]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 8.2.2/8.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Install Type: Msi

[maui-windows]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 9.0.14/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maui\9.0.14\WorkloadManifest.json
Install Type: Msi

[maccatalyst]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 18.2.9173/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.maccatalyst\18.2.9173\WorkloadManifest.json
Install Type: Msi

[android]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 35.0.39/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.android\35.0.39\WorkloadManifest.json
Install Type: Msi

[ios]
Installation Source: VS 17.14.35806.103, VS 17.13.35806.99
Manifest Version: 18.2.9173/9.0.100
Manifest Path: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.sdk.ios\18.2.9173\WorkloadManifest.json
Install Type: Msi

Configured to use loose manifests when installing new manifests.

Host:
Version: 9.0.2
Architecture: x64
Commit: 80aa709f5d

.NET SDKs installed:
6.0.428 [C:\Program Files\dotnet\sdk]
8.0.309 [C:\Program Files\dotnet\sdk]
8.0.406 [C:\Program Files\dotnet\sdk]
9.0.103 [C:\Program Files\dotnet\sdk]
9.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 6.0.36 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 7.0.20 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 8.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
Not set

global.json file:
Not found

Learn more:
https://aka.ms/dotnet/info

Download .NET:
https://aka.ms/dotnet/download

Visual Studio Code Extensions
Extension Author Version Folder Name
azure-pipelines ms-azure-devops 1.249.0 ms-azure-devops.azure-pipelines-1.249.0
copilot GitHub 1.272.0 github.copilot-1.272.0
copilot-chat GitHub 0.24.1 github.copilot-chat-0.24.1
csdevkit ms-dotnettools 1.16.6 ms-dotnettools.csdevkit-1.16.6-win32-x64
csharp ms-dotnettools 2.63.32 ms-dotnettools.csharp-2.63.32-win32-x64
dotnet-maui ms-dotnettools 1.8.9 ms-dotnettools.dotnet-maui-1.8.9-win32-x64
es7-react-js-snippets dsznajder 4.4.3 dsznajder.es7-react-js-snippets-4.4.3
plantuml jebbs 2.18.1 jebbs.plantuml-2.18.1
powershell ms-vscode 2025.0.0 ms-vscode.powershell-2025.0.0
prettier-vscode esbenp 11.0.0 esbenp.prettier-vscode-11.0.0
rainbow-csv mechatroner 3.17.0 mechatroner.rainbow-csv-3.17.0
remote-containers ms-vscode-remote 0.397.0 ms-vscode-remote.remote-containers-0.397.0
remote-wsl ms-vscode-remote 0.88.5 ms-vscode-remote.remote-wsl-0.88.5
service-bus-explorer digital-molecules 0.1.9 digital-molecules.service-bus-explorer-0.1.9
vscode-azure-github-copilot ms-azuretools 0.3.131 ms-azuretools.vscode-azure-github-copilot-0.3.131
vscode-azurefunctions ms-azuretools 1.16.2 ms-azuretools.vscode-azurefunctions-1.16.2
vscode-azureresourcegroups ms-azuretools 0.10.5 ms-azuretools.vscode-azureresourcegroups-0.10.5
vscode-azurestorage ms-azuretools 0.16.2 ms-azuretools.vscode-azurestorage-0.16.2
vscode-bicep ms-azuretools 0.33.93 ms-azuretools.vscode-bicep-0.33.93
vscode-cosmosdb ms-azuretools 0.24.2 ms-azuretools.vscode-cosmosdb-0.24.2
vscode-docker ms-azuretools 1.29.4 ms-azuretools.vscode-docker-1.29.4
vscode-dotnet-pack ms-dotnettools 1.0.13 ms-dotnettools.vscode-dotnet-pack-1.0.13
vscode-dotnet-runtime ms-dotnettools 2.2.8 ms-dotnettools.vscode-dotnet-runtime-2.2.8
vscode-eslint dbaeumer 3.0.10 dbaeumer.vscode-eslint-3.0.10
vscode-pull-request-github GitHub 0.104.1 github.vscode-pull-request-github-0.104.1
vscode-yaml redhat 1.16.0 redhat.vscode-yaml-1.16.0
vscodeintellicode-csharp ms-dotnettools 2.2.3 ms-dotnettools.vscodeintellicode-csharp-2.2.3-win32-x64
vsliveshare ms-vsliveshare 1.0.5948 ms-vsliveshare.vsliveshare-1.0.5948
@ryzngard
Copy link
Contributor

We recently moved to the vs code logger API which handles log levels in a more unified way. They're now located on the output window itself:

Image

@soundaranbu
Copy link
Author

soundaranbu commented Feb 19, 2025

Oh! that's good to know. Thanks @ryzngard. I'll give it a try. Would it help if there's some guidance in the initial dialog for someone new to this?

@ryzngard
Copy link
Contributor

That's a good idea. I was hoping there was good documentation on the vs code API site but it doesn't appear so (https://code.visualstudio.com/api/references/vscode-api#window.createOutputChannel)

Would the wording change to the below be helpful?

Please open the output window, choose the "Razor Log", and use the gear icon to ensure the log level is set to "Debug" or "Trace"

@soundaranbu
Copy link
Author

Yes, perfect! that would do @ryzngard

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants