I am using Visual Studio Community 2019 Preview (16.11.0 Preview 1.0).
I'd like to calculate code metrics for a native C/C++ project but am having trouble. When starting Visual Studio the first time, I had the menu entry "Analyze > Calculate Code Metrics". When selected this created the tab "Code Metric Results" but it was empty. If I try to run again, the menu option was no longer available.
If I try the suggestion in the issue reported at the following link, the menu option reappears:
https://developercommunity.visualstudio.com/t/cant-find-analyze-code-metrics-menu/1033841
However, when I select the option I get a popup with the following error message:
Cannot calculate code metrics because none of the selected projects support code metrics or Visual Studio is debugging an application.
I'm not debugging so my guess is that metrics are not supported in C/C++. Can someone confirm? If so, The documentation should state that and the option and tab should not be shown.
Related
I have a problem with Visual Studio 2019.
From what I have seen in tutorials, during publishing an application, I should be able to change profile settings, by clicking a small pencil (I included a screenshot, it's a little pencil next to "false" and other settings.) However, every time i click it, it opens FolderProfile.pubxml file in Visual Studio instead! Is this indended behaviour, am I doing something completely wrong? How to change that? Screenshot
My problem fixed when I updated visual studio.
Also go to extensions and update all.
Now show UI options.
In a book when they type this in a Windows Forms application, it shows them inheritance tree:
I think in a book they use Visual Studio 2013. And I have Visual Studio 2019.
And here's what I get:
How to make Visual Studio show object graph as on the first screenshot?
As Hans suggested in the comments to first post, I had to go in Tools > Options > Debugging > General, and tick the checkbox "Use Managed Compatibility Mode" to make object graphs as on the first screenshot.
I'm getting an error when I try to inspect variables in my VS 2017 C# code. The errors started with an upgrade.
Native View To inspect the native object, enable native code debugging.
The a google search suggests the following fix, but I cannot find this option on y Project-Properties-Debug page.
To enable debugging of unmanaged code
With a project selected in Solution Explorer, on the Project menu, click Properties.
Click the Debug tab.
Select the Enable unmanaged code debugging check box.
Try This
add the following to your profile in launchsettings.json
"nativeDebugging" : true
I have also read some posts it says like
starting in Visual Studio 2017 version 15.5 you should be able to set <EnableUnmanagedDebugging>true</EnableUnmanagedDebugging> in your .csproj file.
I use. VS 2013 Express
When debugging, I need to stop automatically on exceptions.
try to follow this.
http://msdn.microsoft.com/en-us/library/d14azbfh.aspx#AddExceptionsCommand
It says I need to add Exceptions command to the Debug menu
On the Tools menu, click Customize.
The Customize dialog box appears.
Click the Commands tab and, in the Menu bar list, click Debug.
Click Add Command.
In Categories in the Add Command dialog box, click Debug.
In Commands, click Exceptions and then click OK.
But in stage 6, in Commands there is no Exeptions
Also I tried to remove Enable just my code, And it didn't work.
Just a FYI ---
Im am using VS Express 2010 (VB) and didn't see the debug exceptions.
Based on the screen shot above I just pushed CRLT-ALT-E and it opened.. (!)
Its a bit unclear to me, if VB 2010 Express has this option or not, or how to unhide it, but the key click combo opened it.
I was then able to turn off the option I needed
In my case the "PInvokeStackImbalance"
enter image description here
Another user has reported the missing 'exceptions' on the 'debug' menu to Microsoft and actually got an acknowlegement from Microsoft (though not from the product team and not confirmation that it is a bug).
https://connect.microsoft.com/VisualStudio/feedback/details/882780/exceptions-comman-missing-in-vs-2013-express-for-web
For what it's worth, you can add your vote to this report at that site; I'm experiencing this problem and I have done so too.
Here's a potential work-around: the 'exceptions' is present in the Visual Studio Express for Desktop. And you can install that edition side-by-side with Web edition. If you can figure out a way to invoke your project executable from the debugger in the Desktop edition, you'd have control over exceptions there.
The exceptions menu isn't shown in Visual Studio Web Developer Express. It is only shown in Visual C# Express.
You can however break on all exceptions. You can try to turn off "Just My Code" debugging, which will catch exceptions thrown in CLR code and linked libraries.
To do this, open Tools -> Options -> Debugging -> General, and uncheck "Just My Code" (or Enable Just My Code).
if it doesn't work try
Debug -> Exceptions -> Common Language Runtime Exceptions - check "when thrown"
if you don't see exceptions try to change your settings following this guide
Refer here for documentation.
update
if it still not working try this
Tools menu >> Import and Export Settings >> Reset all settings. Then choose C# Development Environment.
Many of the customization and integration features for Visual Studio's IDE are not available in the free Express editions, but you should be able to get to the Exceptions menu easily enough without using them.
Press F5 to start debugging, then select Debug / Exceptions... Turn on the check box for "C++ Exceptions" "Thrown". Hit "OK"
There is a feature in Eclipse ("Show Source of Selected Element Only") which allows to view the code of the selected method only. All other part of the code is invisible.
I remember that a similar feature was available in Visual Studio 6.0. I would like to know if this feature is available in Visual Studio 2003 and up? If yes, please point out where to find this in the IDE.
This is not available in any one of the later releases. It was called "procedure view" in VS 6. Use outlining feature instead.