Cant debug or see tests when using vscode in wsl with docker and xunit
Ok so Im working on windows a friend in linux. It works fine for him but for me noup.
Im using wsl cuz of docker and vscode. It is an asp.net app. Db is postgres.
Im trying to write integration tests to test the controllers etc using Xunit, CS-Script. .net.8
I dont see any tests in the test explorer nor do the tests hit any breakpoints when executed from the console.
Anyone had this thing happen to them, Ive been stuck 3 days now.
11 Replies
people here will probably tell you not to use vs code
do you have the C# dev kit extension installed?
yes
https://github.com/microsoft/vscode-dotnettools/issues/307 might give this a read, looks like there are a few suggestions to try
ive read this and tried it before noup
your best bet might be to report a new devkit issue and upload logs. Feel free to share the issue here and I'll take a quick look (I'm not on the test team though so my knowledge is limited)
not to sound stupid.. what logs :sadge:
If you use vs code to do "CSharp: Report an Issue" from the command pallete it should either grab the logs or tell you which ones
having the output window for C# and all the Dev Kit things set to "trace" is also useful
especially in this case the "C# Dev Kit - Test Explorer" output window
ill figure it out tmrw thx its 1am memein in foxhole rn
i smashed my head against the c# wall all day 😄 found somewhere "Configuring xdebug to work with Windows 10 (WSL2), Docker and VS Code"... saying that windows defender blocks something there.. i know its not the same but u never know 😄
this thing
downloaded a diff nugget .NET Core Test Explorer it can see the tests in the explorer and runs.. they fail cuz i couldnt bother doing it tonight (need to do the seeding and dump of the db), i need to see if it hits the breakpoints