-
Notifications
You must be signed in to change notification settings - Fork 697
Debug Tests on a Class Library Project #787
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
Comments
@robvanpamel do you have the file mentioned in the error message? I don't understand what that file would be missing, though maybe the error message is just BS and the real problem is something else. |
@gregg-miskelly Maybe interesting to mention is that upgraded from the current version to this beta version. (if I downgrade this works again ...) |
@robvanpamel this looks like something that was broken in 1.5.0-beta1. @DustinCampbell based on da488c5 I assume this is an expected side effect of 94ca7e7 and we should update package.json. Is that correct? |
where is this specified in package.json? |
Ah, yes. Sorry, the package.json had gotten updated on my machine because I was debugging the extension with Node debugger. Yup, that needs fixing. I'll submit a fix shortly. |
sorry for missing that. |
I've produced a new beta, v1.5-beta2, that should address this problem. |
Environment data
dotnet --info
output:.NET Command Line Tools (1.0.0-preview2-003131)
Product Information:
Version: 1.0.0-preview2-003131
Commit SHA-1 hash: 635cf40e58
Runtime Environment:
OS Name: ubuntu
OS Version: 16.04
OS Platform: Linux
RID: ubuntu.16.04-x64
VS Code version: 1.5.3
C# Extension version: 1.5.0-beta1
Steps to reproduce
Create "Class Library Project" with a class to test in it (SUT) .
project file looks like this:
'{
"version": "1.0.0-*",
"dependencies": {
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
}'
Create another class library (which will act as test project)
project file looks like this.
´{
"version": "1.0.0-*",
"testRunner": "xunit",
"buildOptions": {
"debugType": "portable"
},
"dependencies": {
"SAG.NextGen.MessageBroker": "1.0.0-*",
"xunit": "2.2.0-beta2-build3300",
"dotnet-test-xunit": "2.2.0-preview2-build1029"
},
"frameworks": {
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0"
}
}
}
}
}´
Create class Calculator with add method in Class Library Project
Create class CalculatorTestFixture with TestAdd method in Test project second.
Add Fact attribute on TestAdd Method.
Call Add method from Class Library Project
Add breakpoint in the TestAdd Method
Click on the debug link above the TestAdd Method
Expected behavior
Debugging is started on the test method
Actual behavior
An exception is thrown and a red bar appears in VSCode
Failed to start debugger on test because Error: Debug adapter executable '/home/rvpamel/.vscode/extensions/ms-vscode.csharp-1.5.0-beta1/out/coreclr-debug/proxy.js' not found..
Edit : When adding a Program and main method i'm able to debug the unit test but this shouldn't be the case
The text was updated successfully, but these errors were encountered: