To configure the debug target of a CMake library in Visual Studio, follow these steps:
Open the CMakeLists.txt file of the library in Visual Studio.
Click on the "CMake" option in the menu bar and select "Change CMake Settings".
This will open the "CMakeSettings.json" file. Locate the "configurations" section and find the debug configuration.
Within the debug configuration, add the following line:
"buildRoot": "${workspaceRoot}/build/${name}_Debug"
This line specifies the directory where the debug build will be stored.
Save the file and close it.
Open the project properties window by right-clicking on the project in the Solution Explorer and selecting "Properties".
Select the "Debugging" tab and enter the following command in the "Command" field:
"${buildRoot}/<your_library>.dll"
This command specifies which library to run for debugging.
Now, when you start a debug session in Visual Studio, it will use the specified library for debugging.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-07-06 00:56:03 +0000
Seen: 12 times
Last updated: Jul 06 '23
How to solve the issue "process is running" in Visual Studio Debugging?
What is the default folder for Visual Studio Code?
How can I include a DLL in my Visual Studio project if the Browse option is unavailable?
Is it not possible to set another activity as the main activity in Android Studio?
What does it mean to try to use 'FindFirstChild' to index nil in Roblox Studio?
What is the method to transform .Rmd to .md format using R studio?