C
C#•2d ago
CurseOfLife

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
Anton
Anton•2d ago
people here will probably tell you not to use vs code
Keswiik
Keswiik•2d ago
do you have the C# dev kit extension installed?
CurseOfLife
CurseOfLifeOP•2d ago
yes
Keswiik
Keswiik•2d ago
https://github.com/microsoft/vscode-dotnettools/issues/307 might give this a read, looks like there are a few suggestions to try
CurseOfLife
CurseOfLifeOP•2d ago
ive read this and tried it before noup
lycian
lycian•2d ago
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)
CurseOfLife
CurseOfLifeOP•2d ago
not to sound stupid.. what logs :sadge:
lycian
lycian•2d ago
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
CurseOfLife
CurseOfLifeOP•2d ago
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 😄
CurseOfLife
CurseOfLifeOP•2d ago
this thing
No description
CurseOfLife
CurseOfLifeOP•2d ago
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

Did you find this page helpful?