(Modifying the question)I have a windows form app in C# which calls into some C++, and I need to add logs that log to some window in visual studio(output tab or the 'immediate window' tab....I don't care which.
I had this post but none of those solutions worked.....
how to log in win32 c++ to the visual studio output window?
A comment below mentions I can turn debugging on, but there is no "debug tab", there are no tabs whatsoever so I am not sure how to enable debugging in the following picture...
thanks,
Dean
I don't see how to set Enable unmanaged debugging either?
On your C# EXE project, not your C++ project. Right-click the C# project, Properties, Debug tab:
Related
I can't find the disassembly window in Visual Studio Express 2017. In previous versions, in debug mode it was in the menu : Debug -> Windows. I checked if there is an "expert mode" in the options and I haven't found any. Does someone knows where it is?
I finally found a way. I had to reset the environment settings and set it to the Visual C++ scheme. The menu is now there, along with the Memory and Registers menu items. I think that I used the Visual Basic Scheme at first. That's probably why the menus were not there.
To display the Disassembly window
On the Debug menu, choose Windows, and click Disassembly. The
debugger must be running or in break mode.
Here is the reference: How to: Use the Disassembly Window
Although I have enabled masm checked box in my project properties under build dependencies tab but the Microsoft Macro assemble tab does not show up in my project properties. Is that a bug in my vs2013 or something else?
Look at the answers to the following question for some things to try: How to enable Assembly Language support in Visual Studio 2013
I had the same problem, but I was able to get Microsoft Macro Assembler to appear in the project configuration panel by following one of the suggestions listed at the above page. Specifically, I right-clicked an .asm file in the project and set the Item Type to Microsoft Macro Assembler. When I re-opened the project configuration, Microsoft Macro Assembler magically appeared in the list.
Not a bug neither an issue in the visual Studio.All that you are making mistake is not making tick on the empty project while making a new win32 project.That popup menu comes when you make a new project and you have to tick the empty project checkbox then it will be available as you asked.
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"
This is probably a really easy question, but I've spent too much time looking for the answer, so I'm putting my question here:
Whenever I run an app in Visual Studio 2008, my solution explorer disappears... any suggestions as to how I can find it?
Thanks :)
While in debug mode, go to the "View" menu and click "Solution Explorer". Or use Ctrl+W, S
When you are in Debug mode, you can always enable every part of the shell by going to View > Solution Explorer for example.
Remember that the layout of your shell changes between development mode and debug mode. You can save these changes if you want to (eg: when you reinstall Visual Studio) by using the Import/Export Settings in the Tools menu.
Can someone please explain to me what goes to the Output window in VS? Where do the messages there come from and do they have other use other than for debbuging?
Thanks.
The Output window is a set of text panes that you can write to and read from. Visual Studio defines these built-in panes: Build, through which projects communicate messages about builds, and General, through which Visual Studio communicates messages about the integrated development environment (IDE). Projects receive a reference to the Build pane automatically through the IVsBuildableProjectCfg interface methods, and Visual Studio offers direct access to the General pane through the SVsGeneralOutputWindowPane service. In addition to the built-in panes, you can create and manage your own custom panes.
Output Window (Visual Studio SDK)
This panel shows the actual info, that is spit from your application to the console (no matter debug or run mode). Also building, rebuilding and cleaning your project is described as operations there.
Check F1 for more info ;)
By default it either shows output from the build process, or debugger output. You can use OutputDebugString to display text in the output window while debugging.
There's not much else you can do with it without using an Add-In for Visual Studio.