I have a new .NET Core 1.0 project, and for some unknown reason it has stopped (or never did, I do not recall) breaking when debugging.
I've added the StackTrace package here: How can I get the line number and file name from an exception in net Core?
But with no success.
I'm using VS2015 community and the standard tooling from there.
A potentially relevant snippet from my project.json
file:
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true,
"define": [ "DEBUG", "TRACE" ]
},
"runtimes": {
"win10-x64": {}
},
"runtimeOptions": {
"configProperties": {
"System.GC.Server": true
}
},
UPDATE
OK, if ou start with a new Core Web Application everything works as expected.
If you then update all the packages, it'll fail to build until you add:
"runtimes": {
"win10-x64": {},
"win81-x64": {},
"win8-x64": {},
"win7-x64": {},
"win10-x86": {},
"win81-x86": {},
"win8-x86": {},
"win7-x86": {}
},
To the project.json
to get it to build and launch.
By doing this, I can now get line number but still no breaking. My new test project works as expected. I'll have to go through and see the differences.
Tell the debugger to break when an exception is thrownIn the Exception Settings window (Debug > Windows > Exception Settings), expand the node for a category of exceptions, such as Common Language Runtime Exceptions. Then select the check box for a specific exception within that category, such as System.
On the dialog displayed, uncheck "Exception Settings -> Break when this exception type is user-unhandled". Then, Visual Studio will not stop on this exception.
It appears to be that somehow the exception details were unchecked.
I reset all of the project.json
dependencies, which meant I received detailed exceptions on the error pages, however VS still didn't break.
By checking the below:
It's now working correctly. I do not know if that is overkill, and if it's CORE specific, or per project, or something in VS (given a new CORE project did break it makes me think it's per project).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With