-
Notifications
You must be signed in to change notification settings - Fork 676
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
VSCode "Error processing launch options at field: program" popup when debugging an xunit test #3459
Comments
Also experiencing this on windows using NUnit tests: dotnet 2.2.103 |
Can you try enabling debugger logging? https://github.com/OmniSharp/omnisharp-vscode/wiki/Enabling-C%23-debugger-logging#quick-method-for-unit-tests |
@gregg-miskelly Here's what came back for me, at least for nunit:
|
OmniSharp tracing:
|
Looking at the fully qualified name, my guess would be that it is an issue with the fixture data I have applied to these tests:
|
Alright, at least in my case, this is covered by #1734. |
I've got the same issue. Log output
launch.json: {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (console)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/fast-hls-tests/bin/Debug/net5.0/fast-hls-tests.dll",
"args": [],
"cwd": "${workspaceFolder}/fast-hls-tests",
"console": "internalConsole",
"stopAtEntry": false
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
} Further system info:
I've tried removing the launch.json and have it regenerate but no difference. I can confirm that the path used in |
@Vannevelj your problem isn't due to your launch.json file. This extension will attempt to create an in-memory json string to tell the debugger how to launch (see here). OmniSharp is failing to work out the path to the executable to launch. I don't know enough about the OmniSharp side to know if this is a bug in OmniSharp, a problem with your setup, or a problem with xunit -- From your log output: (C) {"command":"launch","arguments":{"logging":{"engineLogging":false},"type":"coreclr","name":".NET Test Launch","request":"launch","debuggerEventsPipeName":"/Users/jeroenvannevel/.vscode/extensions/ms-dotnettools.csharp-1.22.1/.TestDebugEvents-85294","program":null,"args":null,"cwd":"/Users/jeroenvannevel/Documents/source/fast-hls","internalConsoleOptions":"openOnSessionStart","__sessionId":"2b2186ee-bfad-4a76-9787-1625d97909ff"},"type":"request","seq":2} |
I just ran into the same issue here. |
Now we have repro in #3901 , can anyone approve that debugging doesn't work there? |
Repro from #3901: Clone https://github.com/vchirikov/omnisharp_vscode_repro OmniSharp trace logging for the Debug Test request: [info]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestSession.Connected","Payload":null}
[dbug]: OmniSharp.DotNetTest.VSTestManager
send: {"MessageType":"ProtocolVersion","Payload":1}
[info]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"ProtocolVersion","Payload":1}
[info]: OmniSharp.DotNetTest.DebugSessionManager
Debug session started.
[dbug]: OmniSharp.DotNetTest.VSTestManager
send: {"MessageType":"TestDiscovery.Start","Payload":{"Sources":["/Users/joeyrobichaud/Source/omnisharp_vscode_repro/artifacts/omnisharp-vscode-repro.dll"],"RunSettings":"\n<RunSettings>\n <RunConfiguration>\n <TargetFrameworkVersion>.NETCoreApp,Version=v3.1</TargetFrameworkVersion>\n </RunConfiguration>\n</RunSettings>"}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (64-bit .NET Core 3.1.4)"}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.41] Discovering: omnisharp-vscode-repro"}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.46] Discovered: omnisharp-vscode-repro"}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestDiscovery.TestFound","Payload":[{"Properties":[{"Key":{"Id":"TestCase.FullyQualifiedName","Label":"FullyQualifiedName","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"omnisharp_vscode_repro.UnitTest1.Test1"},{"Key":{"Id":"TestCase.ExecutorUri","Label":"Executor Uri","Category":"","Description":"","Attributes":1,"ValueType":"System.Uri"},"Value":"executor://xunit/VsTestRunner2/netcoreapp"},{"Key":{"Id":"TestCase.Source","Label":"Source","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/joeyrobichaud/Source/omnisharp_vscode_repro/artifacts/omnisharp-vscode-repro.dll"},{"Key":{"Id":"TestCase.CodeFilePath","Label":"File Path","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/joeyrobichaud/Source/omnisharp_vscode_repro/UnitTest1.cs"},{"Key":{"Id":"TestCase.DisplayName","Label":"Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"omnisharp_vscode_repro.UnitTest1.Test1"},{"Key":{"Id":"TestCase.Id","Label":"Id","Category":"","Description":"","Attributes":1,"ValueType":"System.Guid"},"Value":"59b97bed-adc2-eb3a-02dc-4b5f9bb224c5"},{"Key":{"Id":"TestCase.LineNumber","Label":"Line Number","Category":"","Description":"","Attributes":1,"ValueType":"System.Int32"},"Value":10},{"Key":{"Id":"XunitTestCase","Label":"xUnit.net Test Case","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":":F:omnisharp_vscode_repro.UnitTest1:Test1:1:0:ed34c1d9dc01408382beebef7592a408"}]}]}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestDiscovery.Completed","Payload":{"TotalTests":1,"LastDiscoveredTests":null,"IsAborted":false,"Metrics":{}}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
send: {"MessageType":"TestExecution.GetTestRunnerProcessStartInfoForRunSelected","Payload":{"TestCases":[{"Properties":[{"Key":{"Id":"TestCase.FullyQualifiedName","Label":"FullyQualifiedName","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"omnisharp_vscode_repro.UnitTest1.Test1"},{"Key":{"Id":"TestCase.ExecutorUri","Label":"Executor Uri","Category":"","Description":"","Attributes":1,"ValueType":"System.Uri"},"Value":"executor://xunit/VsTestRunner2/netcoreapp"},{"Key":{"Id":"TestCase.Source","Label":"Source","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/joeyrobichaud/Source/omnisharp_vscode_repro/artifacts/omnisharp-vscode-repro.dll"},{"Key":{"Id":"TestCase.CodeFilePath","Label":"File Path","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/joeyrobichaud/Source/omnisharp_vscode_repro/UnitTest1.cs"},{"Key":{"Id":"TestCase.DisplayName","Label":"Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"omnisharp_vscode_repro.UnitTest1.Test1"},{"Key":{"Id":"TestCase.Id","Label":"Id","Category":"","Description":"","Attributes":1,"ValueType":"System.Guid"},"Value":"59b97bed-adc2-eb3a-02dc-4b5f9bb224c5"},{"Key":{"Id":"TestCase.LineNumber","Label":"Line Number","Category":"","Description":"","Attributes":1,"ValueType":"System.Int32"},"Value":10},{"Key":{"Id":"XunitTestCase","Label":"xUnit.net Test Case","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":":F:omnisharp_vscode_repro.UnitTest1:Test1:1:0:ed34c1d9dc01408382beebef7592a408"}]}],"DebuggingEnabled":true,"RunSettings":"\n<RunSettings>\n <RunConfiguration>\n <TargetFrameworkVersion>.NETCoreApp,Version=v3.1</TargetFrameworkVersion>\n </RunConfiguration>\n</RunSettings>"}}
[dbug]: OmniSharp.DotNetTest.VSTestManager
read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.1 (64-bit .NET Core 3.1.4)"}}
[dbug]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 68,
"Command": "/v2/debugtest/getstartinfo",
"Running": true,
"Success": true,
"Message": null,
"Body": {
! "FileName": null,
"Arguments": null,
"WorkingDirectory": null,
"EnvironmentVariables": null,
"Succeeded": true,
"ContextHadNoTests": false,
"FailureReason": null
},
"Seq": 471,
"Type": "response"
}
[dbug]: OmniSharp.Stdio.Host
************ Request ************
{
"Type": "request",
"Seq": 70,
"Command": "/v2/debugtest/stop",
"Arguments": {
"FileName": "/Users/joeyrobichaud/Source/omnisharp_vscode_repro/UnitTest1.cs"
}
}
[dbug]: OmniSharp.DotNetTest.VSTestManager
send: {"MessageType":"TestSession.Terminate","Payload":{}}
[info]: OmniSharp.DotNetTest.DebugSessionManager
Debug session ended.
[dbug]: OmniSharp.Stdio.Host
************ Response ************
{
"Request_seq": 70,
"Command": "/v2/debugtest/stop",
"Running": true,
"Success": true,
"Message": null,
"Body": {},
"Seq": 504,
"Type": "response"
} |
I've got the same issue. Log output:
System info: Ambiente de runtime: Host (useful for support): .NET SDKs installed: .NET runtimes installed: To install additional .NET runtimes or SDKs: |
Seems like this should still be open - it's still an issue in 1.22.1 anyway. |
Not sure why this is in closed state, as the issue persists in C# Extension: 1.22.1 (latest) @JoeRobich - Any ETA on the release of this fix ? This just made me download VS 2019, just to run the unit tests ! |
This was fixed (for me) on Mac with the latest released beta |
Update I confirm it worked for me with C# Extension**: 1.23.0 , instructions to download beta helped ! |
Version 1.23.0 fixed it for me. Thanks! |
Steps to Reproduce:
Debug Test
Expected behavior
It should fail before the test runs as we are invoking
MyOtherMethod
without a param. An appropriate message should be shown.Actual behavior
I get this window popup:
I don't get any error messages in console. If I try and
run test
rather thandebug test
it seems to completely bypass the test so I end up with:If I run
dotnet test
I get the same result asrun test
in code lens.Versions:
dotnet 2.1.105
VS code 1.22.2
Omisharp 1.14.0
Ubuntu 16.04.4 LTS
The text was updated successfully, but these errors were encountered: