Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.)

like image 354
Amir Gonnen Avatar asked Dec 03 '15 08:12

Amir Gonnen


1 Answers

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.)

like image 181
sny Avatar answered Nov 10 '22 16:11

sny