I'm making a Node.js app in VS 2017 using Node.js Tools for Visual Studio. When an exception happens, I get an empty Exception Unhandled dialog, does anyone know how to correct this? I want to know what the exception is or it's description, so that I can fix it.
You probably should handle the exception. If you want your program to fail with an error, then it's working as intended and you silence the VisualStudio warning with a pragma like this :
#pragma Exception Unhandled
Related
I'm debugging Node.js application on Visual Studio 2015. It works great but there is one issue I find a big time-waster. If my program runs into an error I see the error on the console, but debugger does NOT stop where the error happened. I have to look up the line-number from the console-log then locate that line in the source-code.
It works better when debugging browser-based JavaScript on Visual Studio, the debugger halts whenever an error is thrown, which is REALLY great.
Is it possible to get the Visual Studio debugger to halt when the debugged program running on Node.js throws an error?
You could install the Node.js Tools for Visual Studio and use the Exception settings windows under Debug->Windows. It would throw or catch the Exception.
http://nodejstools.codeplex.com/discussions/538432
I am creating a project in VS2015. template i have choose is blank Universal app.
An error occurred trying to load the page.
Property accessor 'TargetDescriptions' on object
'Microsoft.VisualStudio.ProjectFlavoring.Automation.Project.CommonProjectExtender'
threw the following exception:'Value cannot be null. Parameter name:
targets'.
I get issues accessing some projects properties due to addins I've added to my VS (GhostDoc): can you try to disable all your addins to check of that work ?
I reinsatlled the nuget package manger: https://visualstudiogallery.msdn.microsoft.com/5d345edc-2e2d-4a9c-b73b-d53956dc458d
I restart the visual studio
and it works fine for me.
I uploaded an extension to the visual studio online gallery, but when I install it through visual studio I get this exception at the end of the installation
This error only happens when I install it from visual studio. If I download the vsix and double click it to install, I do not see this error.
Any pointers to why this might be happening? Right now I don't have any way to debug this or get logs for this.
This was due to a bad value in the "Getting started guide" field of the vsixmanifest. I discovered this by attaching the vs debugger to the instance of visual studio that was throwing the error and observing the stack trace (after enabling break when CLR exceptions thrown in the debugger).
This was the exception in the debugger
System.NullReferenceException occurred
HResult=-2147467261
Message=Object reference not set to an instance of an object.
Source=Microsoft.VisualStudio.ExtensionManager.Implementation
StackTrace:
at Microsoft.VisualStudio.ExtensionManager.UI.ExtensionManagerWindow.NavigateToGettingStartedGuide(Uri gettingStartedGuideUri)
I get the following error when I successfully run unit tests in VS2012:
The cancelation of the test run is not possible as
there is no test run which is in progress
The error only appears after the unit tests succeeds (green check in visual studio).
Why do I get this error?
I'm using VS 2012 and using the Test Explorer with the NUnit Test Adapter and this error prevented me from being able to debug a failing test. I found a workaround to this issue here
To overcome these exceptions:
Navigate to the Debug menu item
Select "Options and Settings..."
Check "Enable Just My Code"
As a side note, this also allows you to step-into shimmed code (via
fakes usage).
Disable breaking on InvalidOperationException in the exceptions dialog.
Visual studio seems to unsuccessfully stop the already finished test, which leads to this error.
I also restarted Visual Studio and the error no longer appeared.
I'm not sure why you would want to disable breaking on InvalidOperationException to fix the problem. What if you actually had an InvalidOperationException in the future?
I restarted Visual Studio and the problem went away.
I have disabled breaking on System.NullReferenceException in Visual Studio 2012 Express for Web when that exception occured in debug mode.
How to enable it now? Debug/Exceptions menu item is missing.
I searched for System.NullReferenceException keys in registry, and value of State was always 16418 - same as other exceptions.
I believe (but can't verify right now) that those options are saved in the solution's suo (solution user options) file which is in the same directory as the solution (sln) file.
You can try to move the file to a different directory and see if your exception comes back. You'll loose any other customization you've done thought (start up project, breakpoints, watches, etc.)
Or you may try creating an extension and adding this functionality back to express :-)