I don't know if this already possible but I wish that, if debugger can treat external dll by skipping when we navigate debugger, it could be do the same thing on some file in the project
In my case, I have one large C# file that was generated from antlr in my project. And it make the debugger freezing anytime the step going into that file
I don't need to debug anything in that file but I the step need to pass that file so many times, and so I want to ignore any step that got into that file, just skip it like it was not my code
Is it possible?
VSCode version: 1.43.1
C# Extension: 1.21.15
Dotnet Information
.NET Core SDK (reflecting any global.json):
Version: 2.2.301
Commit: 70d6be0814
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18362
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.2.301\
Host (useful for support):
Version: 2.2.6
Commit: 7dac9b1b51
.NET Core SDKs installed:
1.0.0-preview2-003131 [C:\Program Files\dotnet\sdk]
1.0.0-preview2-1-003177 [C:\Program Files\dotnet\sdk]
1.0.2 [C:\Program Files\dotnet\sdk]
1.0.4 [C:\Program Files\dotnet\sdk]
2.1.2 [C:\Program Files\dotnet\sdk]
2.1.4 [C:\Program Files\dotnet\sdk]
2.1.200-preview-007474 [C:\Program Files\dotnet\sdk]
2.1.201 [C:\Program Files\dotnet\sdk]
2.1.202 [C:\Program Files\dotnet\sdk]
2.1.301 [C:\Program Files\dotnet\sdk]
2.1.500-preview-009297 [C:\Program Files\dotnet\sdk]
2.1.508 [C:\Program Files\dotnet\sdk]
2.1.509 [C:\Program Files\dotnet\sdk]
2.2.104 [C:\Program Files\dotnet\sdk]
2.2.301 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 1.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.12 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
Visual Studio Code Extensions
|Extension|Author|Version|
|---|---|---|
|auto-close-tag|formulahendry|0.5.6|
|auto-rename-tag|formulahendry|0.1.1|
|blender-development|JacquesLucke|0.0.12|
|cpptools|ms-vscode|0.26.3|
|csharp|ms-dotnettools|1.21.15|
|ftp-simple|humy2833|0.7.5|
|java|redhat|0.58.0|
|lex-flex-yacc-bison|faustinoaq|0.0.3|
|mono-debug|ms-vscode|0.15.8|
|new-cmd|odonno|0.2.0|
|npm-intellisense|christian-kohler|1.3.0|
|path-intellisense|christian-kohler|1.4.2|
|python|ms-python|2020.3.69010|
|search-node-modules|jasonnutter|1.3.0|
|t4-support|zbecknell|0.4.3|
|tslint|eg2|1.0.44|
|tt-processor|aisoftware|0.8.0|
|TypeScriptImport|kevinmcgowan|1.17.0|
|unity-debug|Unity|2.7.5|
|unity-snippets|YclepticStudios|0.1.2|
|vetur|octref|0.24.0|
|vs-keybindings|ms-vscode|0.2.0|
|vscode-antlr4|mike-lischke|2.2.3|
|vscode-azurefunctions|ahmelsayed|0.0.1|
|vscode-docker|ms-azuretools|1.0.0|
|vscode-eslint|dbaeumer|2.1.1|
|vscode-java-debug|vscjava|0.25.1|
|vscode-java-dependency|vscjava|0.9.0|
|vscode-java-pack|vscjava|0.8.1|
|vscode-java-test|vscjava|0.22.2|
|vscode-maven|vscjava|0.21.2|
|vscode-npm-script|eg2|0.3.11|
|vscode-nuget-package-manager|jmrog|1.1.6|
|vscode-open-in-github|ziyasal|1.3.6|
|vscode-xml|redhat|0.10.1|
|vscodeintellicode|VisualStudioExptTeam|1.2.6|
|vscodeunitycollab|thainayu|0.0.1|
|vsfire|toba|1.4.1|
|vue-ls-snippets|vaniship|0.0.5|;
In case you have an option to change code causing you problem, I believe omnisharp respects [DebuggerStepThrough] and related debugging attributes?
@SirIntruder Thank you very much but are there any other option? Because custom attribute would be removed every times it got regenerated
Not sure... you can definitely ease the pain by just adding the attribute to the class, instead to each method. If generated class is by any chance partial, or you can tell antlr to mark it as partial, you can solve the issue by adding the attribute to the non-generated part.
That was really interesting solution. Seem like antlr did generate partial class, maybe for this purpose
Most helpful comment
Not sure... you can definitely ease the pain by just adding the attribute to the class, instead to each method. If generated class is by any chance partial, or you can tell antlr to mark it as partial, you can solve the issue by adding the attribute to the non-generated part.