You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
g++ /path/testStr.cpp -o /path/testStr
gdb /path/str
b 16 if strcmp(str1, "char4")==0
r
It is clear that the above gdb debug process is in the linux shell.
The running program suspend when str1 is char4. The detail is as the following picture.
I set one same condition breakpoint "strcmp(str1, "char4")==0" in the 16th in testStr.cpp in VSCode IDE. The execution result of the program in VSCode is different from the above gdb debug result. The same breakpoint in VSCode seems to be invalid. The program doesn't suspend when str1 is char4 and finishes all the code lines. The detail is as following.
The text was updated successfully, but these errors were encountered:
Discussed in #8509
Originally posted by 2994186010 December 9, 2021
My example code(testStr.cpp) is as following.
The executed commands is as following.
It is clear that the above gdb debug process is in the linux shell.
The running program suspend when str1 is char4. The detail is as the following picture.
I set one same condition breakpoint "strcmp(str1, "char4")==0" in the 16th in testStr.cpp in VSCode IDE. The execution result of the program in VSCode is different from the above gdb debug result. The same breakpoint in VSCode seems to be invalid. The program doesn't suspend when str1 is char4 and finishes all the code lines. The detail is as following.
The text was updated successfully, but these errors were encountered: