-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[wasm][debugger] Hide members from classes that don't have debug information #73982
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
88a6e18
adding fields that are from non-user-code as private
thaystg 80501d5
Merge remote-tracking branch 'origin/main' into thays_fix_43184
thaystg 7969c92
Do not show members from types that doesn't have debug information if…
thaystg 6a2dd67
Addressing @radical comments.
thaystg 3580e80
Apply suggestions from code review
thaystg 048d2d3
Adding more tests.
thaystg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ger-test-without-debug-symbols-to-load/debugger-test-without-debug-symbols-to-load.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <DebugType>none</DebugType> | ||
| <DebugSymbols>false</DebugSymbols> | ||
| </PropertyGroup> | ||
| </Project> |
35 changes: 35 additions & 0 deletions
35
src/mono/wasm/debugger/tests/debugger-test-without-debug-symbols-to-load/test.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| using System; | ||
|
|
||
| namespace DebuggerTests | ||
| { | ||
| public class ClassWithoutDebugSymbolsToInherit | ||
| { | ||
| private int propA {get;} | ||
| public int propB {get;} | ||
| protected int propC {get;} | ||
| private int d; | ||
| public int e; | ||
| protected int f; | ||
| public int G | ||
thaystg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| { | ||
| get {return f + 1;} | ||
thaystg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| public int H => f; | ||
|
|
||
| public ClassWithoutDebugSymbolsToInherit() | ||
| { | ||
| propA = 10; | ||
| propB = 20; | ||
| propC = 30; | ||
| d = 40; | ||
| e = 50; | ||
| f = 60; | ||
| Console.WriteLine(propA); | ||
| Console.WriteLine(propB); | ||
| Console.WriteLine(propC); | ||
| Console.WriteLine(d); | ||
| Console.WriteLine(e); | ||
| Console.WriteLine(f); | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1275,3 +1275,66 @@ public static void MethodWithHiddenLinesAtTheEnd3() | |
| #line default | ||
| } | ||
|
|
||
| public class ClassInheritsFromClassWithoutDebugSymbols : DebuggerTests.ClassWithoutDebugSymbolsToInherit | ||
| { | ||
| public static void Run() | ||
| { | ||
| var myVar = new ClassInheritsFromClassWithoutDebugSymbols(); | ||
| myVar.CallMethod(); | ||
| } | ||
|
|
||
| public void CallMethod() | ||
| { | ||
| System.Diagnostics.Debugger.Break(); | ||
| } | ||
|
|
||
| public int myField; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add custom, and autogenerated properties too. |
||
| } | ||
|
|
||
| [System.Diagnostics.DebuggerNonUserCode] | ||
| public class ClassNonUserCodeToInherit | ||
| { | ||
| private int propA {get;} | ||
| public int propB {get;} | ||
| protected int propC {get;} | ||
| private int d; | ||
| public int e; | ||
| protected int f; | ||
| public int G | ||
| { | ||
| get {return f + 1;} | ||
thaystg marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
| public int H => f; | ||
|
|
||
| public ClassNonUserCodeToInherit() | ||
| { | ||
| propA = 10; | ||
| propB = 20; | ||
| propC = 30; | ||
| d = 40; | ||
| e = 50; | ||
| f = 60; | ||
| Console.WriteLine(propA); | ||
| Console.WriteLine(propB); | ||
| Console.WriteLine(propC); | ||
| Console.WriteLine(d); | ||
| Console.WriteLine(e); | ||
| Console.WriteLine(f); | ||
| } | ||
| } | ||
|
|
||
| public class ClassInheritsFromNonUserCodeClass : ClassNonUserCodeToInherit | ||
| { | ||
| public static void Run() | ||
| { | ||
| var myVar = new ClassInheritsFromNonUserCodeClass(); | ||
| myVar.CallMethod(); | ||
| } | ||
|
|
||
| public void CallMethod() | ||
| { | ||
| System.Diagnostics.Debugger.Break(); | ||
| } | ||
|
|
||
| public int myField; | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,7 @@ | |
| <ProjectReference Include="..\ApplyUpdateReferencedAssembly\ApplyUpdateReferencedAssembly.csproj" /> | ||
| <ProjectReference Include="..\debugger-test-special-char-in-path-#@\debugger-test-special-char-in-path.csproj" ReferenceOutputAssembly="false" /> | ||
| <ProjectReference Include="..\debugger-test-with-source-link\debugger-test-with-source-link.csproj" ReferenceOutputAssembly="false" Private="true" /> | ||
| <ProjectReference Include="..\debugger-test-without-debug-symbols-to-load\debugger-test-without-debug-symbols-to-load.csproj" Private="true" /> | ||
| <!-- loaded by *tests*, and not the test app --> | ||
| <ProjectReference Include="..\lazy-debugger-test-embedded\lazy-debugger-test-embedded.csproj" ReferenceOutputAssembly="false" Private="true" /> | ||
|
|
||
|
|
@@ -44,14 +45,14 @@ | |
| <WasmMainJSPath>debugger-main.js</WasmMainJSPath> | ||
| <!-- -1 enabled debugging and disables debug logging. --> | ||
| <WasmDebugLevel Condition="'$(WasmDebugLevel)'==''">-1</WasmDebugLevel> | ||
|
|
||
| <WasmResolveAssembliesBeforeBuild>true</WasmResolveAssembliesBeforeBuild> | ||
| </PropertyGroup> | ||
|
|
||
| <ItemGroup> | ||
| <WasmAssembliesToBundle Include="$(OutDir)\$(TargetFileName)" /> | ||
| <WasmAssembliesToBundle Include="$(OutDir)\debugger-test-special-char-in-path.dll" /> | ||
| <WasmAssembliesToBundle Include="$(OutDir)\debugger-test-with-source-link.dll" /> | ||
| <WasmAssembliesToBundle Include="$(OutDir)\debugger-test-without-debug-symbols-to-load.dll" /> | ||
| <WasmAssembliesToBundle Include="$(MicrosoftNetCoreAppRuntimePackRidDir)\lib\$(NetCoreappCurrent)\System.Runtime.InteropServices.JavaScript.dll" /> | ||
|
|
||
| <!-- Assemblies only dynamically loaded --> | ||
|
|
@@ -63,6 +64,7 @@ | |
|
|
||
| <WasmAssemblySearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)native"/> | ||
| <WasmAssemblySearchPaths Include="$(MicrosoftNetCoreAppRuntimePackRidDir)lib\$(NetCoreAppCurrent)"/> | ||
| <WasmAssemblySearchPaths Include="$(OutDir)"/> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this needed? |
||
| </ItemGroup> | ||
| </Target> | ||
| <Target Name="PreserveEnCAssembliesFromLinking" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be right after
int typeId = typeIdsIncludingParents[I];.