Find out Current Directory during Visual Studio C++ Debug session - c++

I'm debugging C++ native application on Visual Studio 2015.
After stopping on a breakpoint, I would like to know the Current Directory. (It could have changed during the execution before stopping on that breakpoint).
On .NET debugging it is possible through the immediate window. This does not work when debugging C++ native application.
Is there a way I could find out the Current Directory when debugging C++ native application?
To make it clear - I don't want to change and build my code again. I would like to find this out in the debugger (watch window, command/immediate window etc.)

In Visual Studio 2015 there is a "C# Interactive" Window.
You can use the C# command from .NET solution you presented to get the current directory while debugging Native project.
View -> Other Windows -> C# Interactive
If you don't see this option you might want to reinstall VS2015 with C#/.NET components. (I have selected all C# related components during the install.)

Related

No Build Button on Visual Studio

enter image description here
Hello, I have just downloaded JUCE and followed the simple tutorial on the JUCE website.
When I tried to run the jucer file that I made, I couldn't find how to build and run.
As shown on the image, there's no build button on the menu bar.
First, I thought that there was no build button because I haven't used the visual studio for about 6 months.
But when I looked others' window (through Youtube), there was a build button on the menu bar.
Can anyone explain this to me and give me the solution??
Also, I have few more questions.
Other people could directly move to visual studio from JUCE by clicking the icon. However, my program just saves the process but not moving to visual studio. I'd like to know how make it work.
If the solution for my main question (not additional question written above) is due to file extension, (because it is jucer file), is there any method that I can run this jucer file??
Thank you.
Visual studio code is more or less like text editor. I don't think so you can build Projucer project.
you can find this data in Projucer Manual.
1.2 System Requirements
The Projucer is available for all three major operating systems and has the following system requirements:
macOS : 10.9 or higher
Windows : 8.1 or higher and Visual Studio 2015 or higher.
Linux : Ubuntu 16.04.3 LTS
You can view more info in : Source

VIsual Studio: Avoid console from popping up and integrate it into IDE instead

In Visual Studio when I run a program, the console pops up as a separate window. Many other IDEs, such as CLion or Eclipse integrate that console in the IDE. Is there a way to do this in Visual Studio as well? I feel this is a very basic requirement but I cannot find any such functionality.
No not really, tough why would you need it like that? If you are making an app with some graphical library and you down want it to show up you can disable it in the project options.

How to display Visual Studio Console Application output inside the IDE and not in command prompt?

I recently started C++ programming on Visual Studio and I noticed that it always gives me the console output in the command prompt (CMD).
I am a java programmer and I'm used to working with Eclipse and Netbeans. With those IDEs, I was able to see the console inside the IDE and not in a different separate window.
Is there a way to display the console output inside Visual Studio, like Eclipse and Netbeans do?
It's infuriating. I spent hours looking for this. Visual Studio doesn't have command prompt inside the IDE.
They have it for Visual Studio code - Intergrated command prompt. But not for visual studio 2015 Enterprise. So, in other words, microsoft has command prompt terminal inside the free version of visual studio but not for the paid version
Unfortunately, the answer seems to be no.
In Visual Studio, console applications are displayed on the command prompt and not inside Visual Studio itself. Meaning that Console.WriteLine method and similar ones write your output to the console window because your application type is Console Application.
You are able to write output to Visual Studio itself by using System.Diagnostics.Debug.WriteLine as mentioned on MSDN. That will cause the debug output to appear in the Output Window inside Visual Studio. In case you don't see that view, you can choose to show it by Debug => Windows => Output.
You should bare in mind that this is not what you asked for.
This "solution" is helpful just in case you want to debug parts of your code and don't want to open the command prompt but just see the relevant output inside the IDE.
In addition, you won't be able to give input back in this output view.
The most important thing, you will not be able to execute your application correctly outside of your coding environment. So, it will work only on the IDE but you won't be able to see this output when the application is on its own (as it meant to be as a console application).
Another solution, that you might like, is to work with Eclipse.
You said that you are familiar with Eclipse as a Java developer and now you work with C++ and don't get along with Visual Studio so far.
So, you can download Eclipse IDE for C/C++ Developers.
In there you will be familiar with the IDE and you will be able to display your output inside Eclipse without any weird and unnecessary workarounds.

QtCreator debugger not found

I am using Qt 5.1 with Visual Studio 2010. I can compile and run C++ projects with Qt, but when I try to place breakpoints and then debug, I am getting the following error:
no debugger set up
How should I set up the debugger? I would like to make it clear that I have been using Visual Studio 2010 with Qt 5.1.
From the official "Setting up Debugger" QtCreator documentation:
when using the Microsoft tool chain the Microsoft Console Debugger
CDB, is needed.
See this part of the documentation here inline as well:
Debugging tools for Windows To use this engine, you must install the Debugging tools for Windows. You can download them from Download and Install Debugging Tools for Windows. Note: Visual Studio does not include the Debugging tools needed, and therefore, you must install them separately.
The pre-built Qt SDK for Windows makes use of the library if it is present on the system. When manually building Qt Creator using the Microsoft Visual C++ Compiler, the build process checks for the required files in "%ProgramFiles%\Debugging Tools for Windows".
It is highly recommended that you add the Symbol Server provided by Microsoft to the symbol search path of the debugger. The Symbol Server provides you with debugging informaton for the operating system libraries for debugging Windows applications. For more information, see Setting the Symbol Server in Windows.
The documentation basically refers to the following MSDN url for downloading the native CDB debugger:
http://msdn.microsoft.com/en-us/windows/hardware/gg463009/
You can also set up the symbol server or Windows if you wish to go that far:
To obtain debugging information for the operating system libraries for
debugging Windows applications, add the Symbol Server provided by
Microsoft to the symbol search path of the debugger: Select Tools >
Options > Debugger > CDB. In the Symbol paths field, open the Insert
menu and select Symbol Server. Select a directory where you want to
store the cached information and click OK. Use a subfolder in a
temporary directory, such as C:\temp\symbolcache. Note: Populating the
cache might take a long time on a slow network connection. Note: The
first time you start debugging by using the Debugging tools for
Windows, Qt Creator prompts you to add the Symbol Server.
You need to install Microsoft Console Debugger (cdb) (that is part "Debugging Tools for Windows" in wdk/sdk, make sure you select it if you install the wdk/sdk or it can be found as a standalone install in the link above)

Is there a way to get Visual Studio to unload dlls?

I have a Visual Studio 2008 project with some legacy native C++ DLL projects, and some newer WPF projects that use the DLLs. When I open the WPF xaml windows in the designer, Visual Studio loads up the native DLLs to be able to display the window.
The problem is, is that if I now need to make a change in the legacy DLLs, I need to close all the WPF windows and restart visual studio to be able to build them. Obviously, I need to close the tabs that are using the DLLs, but after I do that, is there a way to tell Visual Studio to unload those DLLs without a full restart?
I've had similar problems. A little bit better than restarting is removing references to the dlls, then adding the references back in.
Sounds like a bug in VS. You could try getting VS 2008 SP1 to see if that fixes it.
Otherwise, go here and report it: http://connect.microsoft.com/VisualStudio. They'll help with any workaround if there is one.