In particular, the logging attribute can be used to enable additional logging output, which can be useful for troubleshooting if the debugger is not working as expected. Refer to the C/C++ debugging documentation for additional information. "miDebuggerPath": "C:/Tools/android-ndk-r13b/prebuilt/windows-x86_64/bin/gdb.exe", This should point to the local version of the executable with debug symbols (the non-stripped version), which is normally in obj/local/armeabi-v7a under the project's build directory (or obj/local/arm64-v8a for 64 bit builds).ĭoesn't really have any effect, but is required. This is the name that will be displayed in the UI. The required attributes are described below. If this option is not available the C/C++ extension is not installed and none of this is going to work.Ĭonfigure the debugger settings for the project. Open the Debug menu and click Add Configuration.Ĭhoose C/C++ (gdb) Launch as the configuration type. If the project does not specify the APP_OPTIM setting, setting NDK_DEBUG as described above will automatically disable optimizations.īefore debugging the first time, open the project workspace in VSCode and perform the following steps: Optimization can be disabled by passing APP_OPTIM=debug on the ndk-build command line, or by modifying it in the project's Application.mk file. While debugging optimized code it possible, it will be a more limited and difficult debugging experience. This will need to be copied to the target device to enable the debugger connection.Īlso, if the project's Application.mk file specifies the APP_OPTIM setting, it must be set to debug to disable compiler optimizations. This can be achieved by passing NDK_DEBUG=1 on the ndk-build command line, or by adding it to the project's Application.mk file. Enabling NDK_DEBUG also causes ndk-build to copy the correct version of gdbserver to the project's output directory. A build of the target project with debugging enabled.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |