C# Debugger for ASP.NET Project gives different results than using dotnet run
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 32/100
調査の方向性
VS Code デバッガーと dotnet run を使用して、ASP.NET プロジェクトで報告された差異を再現します。まず launch.json と launchsettings.json を比較し、次に Program.cs、.resx リソース、生成された Razor ビューを調査します。欠落しているリソースとビューの上書きについて再現可能な原因を特定して文書化するか、デバッガーとターミナルの動作が同等であることを確認できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Created several C# ASP.NET projects and tried using the C# and C# Dev Kit Extensions' Debugger. In most cases, it works as expected but additional issues keep piling up and could not find any solutions.
Eventually, I discovered that running dotnet run from the terminal resolved these issues, but could not find out why.
PROBLEM - Using the C# VS Code Debugger vs dotnet run has different results
- Pages cannot be found by the Debugger unless using the RazorRuntimeCompilation NuGet package and adding it in program.cs
- Translations through .resx files are not applied when using the debugger.
- View overrides through scaffolding are not applied, and reverts to a default.
ISSUE 1 - Loading .resx files
One MVC project uses .resx files for localization. Running this project with dotnet run has the page display in the correct languages.
When using the Debugger, it only shows English. In code, I've tried to print a list in the console of all keys, but it throws a MissingManifestResourceException when using the debugger, which seems to indicate that it cannot find the resx files.
ISSUE 2 - View Override
A different MVC Project is set up with the Security template option to create local accounts. I've scaffolded the default Register page to also allow users to input additional information like First Name, Middle Name, Last Name, etc.
Using dotnet run, navigating to the page to Register shows the additional fields I've added.
Using the Debugger, it just shows the standard Register page without my changes. For some reason, the debugger does not find my changed files. First image is the page using the Debugger, second one is using dotnet run
Things I've tried
- Ensured that launch.json and launchsettings.json match. They do.
- Toggle AddRazorRuntimeCompilation() in program.cs to see if it makes any difference. Without it, using the debugger doesn't work as it cannot find ANY file at all.
- Asked on Stack Overflow. No replies.
Most of my findings point towards the Flatpak being sandboxed and VS Code's Debugger being unable to find the correct files. But the debugger and dotnet commands have the same permissions so not sure why it could cause a difference.
- 主要言語
- Shell
- スター
- 216
- フォーク
- 82
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
flathub/com.visualstudio.code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
flathub/com.visualstudio.code#679 · コメント 4 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
flathub/com.visualstudio.code#563 · リアクション 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
flathub/com.visualstudio.code#388 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
flathub/com.visualstudio.code#715 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
flathub/com.visualstudio.code#710 ·
flathub/com.visualstudio.code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
danielmiessler/LifeOS#2218 ·
-
docs(agents): strengthen the no-backslash-escaped-backticks rule with an issue-creation example オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
technical-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
ll7/robot_sf_ll7#9560 ·
-
package-update
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
oSoWoSo/vOid_Community_repOsitory#148 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100