-
Notifications
You must be signed in to change notification settings - Fork 714
Description
Issue Description
breakpoint not hit on async task function
Steps to Reproduce
dotnet new react -n testx
in WeatherForecastController.cs replace
public IEnumerable<WeatherForecast> Get()
with
public async Task<IEnumerable<WeatherForecast>> Get()
and add a test exception throw ( see full repro here )
Expected Behavior
vscode breakpoint on exception
Actual Behavior
breakpoint not hit then reported only on DEBUG CONSOLE
Logs
OmniSharp log
OmniSharp server started.
Path: /home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/run
PID: 17556
Starting OmniSharp on ubuntu 19.4 (x64)
info: OmniSharp.Services.DotNetCliService
DotNetPath set to dotnet
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Located 1 MSBuild instance(s)
1: StandAlone 16.3 - "/home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin"
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
MSBUILD_EXE_PATH environment variable set to '/home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin/MSBuild.dll'
info: OmniSharp.MSBuild.Discovery.MSBuildLocator
Registered MSBuild instance: StandAlone 16.3 - "/home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin"
CscToolExe = csc.exe
MSBuildToolsPath = /home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin
CscToolPath = /home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild/Current/Bin/Roslyn
BypassFrameworkInstallChecks = true
MSBuildExtensionsPath = /home/devel0/.vscode-insiders/extensions/ms-vscode.csharp-1.21.11/.omnisharp/1.34.11/omnisharp/.msbuild
info: OmniSharp.Cake.CakeProjectSystem
Detecting Cake files in '/home/devel0/tmp/testx'.
info: OmniSharp.Cake.CakeProjectSystem
Could not find any Cake files
info: OmniSharp.MSBuild.ProjectSystem
No solution files found in '/home/devel0/tmp/testx'
info: OmniSharp.MSBuild.ProjectManager
Queue project update for '/home/devel0/tmp/testx/testx.csproj'
info: OmniSharp.Script.ScriptProjectSystem
Detecting CSX files in '/home/devel0/tmp/testx'.
info: OmniSharp.Script.ScriptProjectSystem
Could not find any CSX files
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0
info: OmniSharp.MSBuild.ProjectManager
Loading project: /home/devel0/tmp/testx/testx.csproj
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110
info: OmniSharp.WorkspaceInitializer
Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.EditorConfigWorkspaceOptionsProvider, Order: 200
info: OmniSharp.WorkspaceInitializer
Configuration finished.
info: OmniSharp.Stdio.Host
Omnisharp server running using Stdio at location '/home/devel0/tmp/testx' on host 17288.
info: OmniSharp.MSBuild.ProjectManager
Successfully loaded project file '/home/devel0/tmp/testx/testx.csproj'.
info: OmniSharp.MSBuild.ProjectManager
Adding project '/home/devel0/tmp/testx/testx.csproj'
info: OmniSharp.MSBuild.ProjectManager
Update project: testx
C# log
Microsoft.AspNetCore.SpaServices: Error: Browserslist: caniuse-lite is outdated. Please run next command npm update
Loaded '/usr/share/dotnet/shared/Microsoft.AspNetCore.App/3.1.1/Microsoft.AspNetCore.Http.Extensions.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.1/System.Net.WebSockets.Client.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.1/System.Net.WebHeaderCollection.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded 'Anonymously Hosted DynamicMethods Assembly'.
Exception thrown: 'System.Exception' in testx.dll
Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.1/System.Diagnostics.StackTrace.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.1/System.Reflection.Metadata.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
Loaded '/usr/share/dotnet/shared/Microsoft.NETCore.App/3.1.1/System.Collections.Immutable.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
fail: Microsoft.AspNetCore.Server.Kestrel[13]
Connection id "0HLTBMAHAUUQD", Request id "0HLTBMAHAUUQD:0000000B": An unhandled exception was thrown by the application.
System.Exception: SAMPLE
at testx.Controllers.WeatherForecastController.Get() in /home/devel0/tmp/testx/Controllers/WeatherForecastController.cs:line 30
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication
1 application)
Microsoft.AspNetCore.Server.Kestrel: Error: Connection id "0HLTBMAHAUUQD", Request id "0HLTBMAHAUUQD:0000000B": An unhandled exception was thrown by the application.
System.Exception: SAMPLE
at testx.Controllers.WeatherForecastController.Get() in /home/devel0/tmp/testx/Controllers/WeatherForecastController.cs:line 30
at lambda_method(Closure , Object )
at Microsoft.Extensions.Internal.ObjectMethodExecutorAwaitable.Awaiter.GetResult()
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.AwaitableObjectResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted) at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync() --- End of stack trace from previous location where exception was thrown --- at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope) at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication
1 application)
Environment information
VSCode version: 1.42.0-insider
C# Extension: 1.21.11
Mono Information
OmniSharp using built-in monoDotnet Information
.NET Core SDK (reflecting any global.json): Version: 3.1.101 Commit: b377529961Runtime Environment:
OS Name: ubuntu
OS Version: 19.04
OS Platform: Linux
RID: ubuntu.19.04-x64
Base Path: /usr/share/dotnet/sdk/3.1.101/
Host (useful for support):
Version: 3.1.1
Commit: a1388f194c
.NET Core SDKs installed:
3.1.101 [/usr/share/dotnet/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.1.1 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.1 [/usr/share/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 |
---|---|---|
bash-beautify | shakram02 | 0.1.1 |
beautify | HookyQR | 1.5.0 |
Bookmarks | alefragnani | 10.7.0 |
code-gnu-global | austin | 0.2.2 |
cpptools | ms-vscode | 0.26.3 |
csharp | ms-vscode | 1.21.11 |
debugger-for-chrome | msjsdiag | 4.12.6 |
docomment | k--kato | 0.1.8 |
dotnet-test-explorer | formulahendry | 0.7.1 |
easy-cpp-projects | ACharLuk | 1.7.7 |
gitlens | eamodio | 10.2.0 |
jshint | dbaeumer | 0.10.21 |
lintlens | ghmcadams | 2.7.0 |
live-sass | ritwickdey | 3.0.0 |
LiveServer | ritwickdey | 5.6.1 |
markdown-auto-toc | wibblemonkey | 0.3.0 |
markdown-mermaid | bierner | 1.4.2 |
markdown-pdf | yzane | 1.4.1 |
npm-intellisense | christian-kohler | 1.3.0 |
python | ms-python | 2020.1.58038 |
reload | natqe | 0.0.6 |
todo-tree | Gruntfuggly | 0.0.167 |
vscode-arduino | vsciot-vscode | 0.2.29 |
vscode-clang | mitaki28 | 0.2.3 |
vscode-coverage-gutters | ryanluker | 2.4.3 |
vscode-docker | ms-azuretools | 0.10.0 |
vscode-eslint | dbaeumer | 2.0.15 |
vscode-jest | Orta | 3.1.1 |
vscode-markdownlint | DavidAnson | 0.34.0 |
vscode-npm-script | eg2 | 0.3.11 |
vscode-nuget-package-manager | jmrog | 1.1.6 |
vscode-react-native | msjsdiag | 0.14.0 |
vscode-todo-highlight | wayou | 1.0.4 |
vscode-typescript-tslint-plugin | ms-vscode | 1.2.3 |
webpack | jeremyrajan | 2.2.0 |
xml-format | mikeburgh | 1.0.2 |