Find out the current directory during a Visual Studio C ++ debugging session

I am debugging my own C ++ application on Visual Studio 2015.
After stopping at a breakpoint, I would like to know the current directory. (It could be changed at run time before stopping at that breakpoint).

.NET debugging is possible through the nearest window . This does not work when debugging a native C ++ application.

Is there a way to find out the current directory when debugging a native C ++ application?

To make it clear - I do not want to change the code again and again create my own code. I would like to find this in the debugger (viewport, command / immediate launch window, etc.)

+4
source share
2 answers

Visual Studio 2015 has a "C # Interactive" window. You can use the C # command from the .NET solution that you presented to get the current directory when debugging your own project. Browse → Other Windows → C # Interactive

If you do not see this option, you may need to reinstall VS2015 with C # / components. NET (I selected all C # related components during installation.)

+1
source

You can use the windows :: getCurrentDirectory API function in your code ( https://msdn.microsoft.com/de-de/library/windows/desktop/aa364934(v=vs.85).aspx )

-3

Source: https://habr.com/ru/post/1618386/


All Articles