-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
While debugging using VSCode, execution goes into infinite loop. #8776
Comments
Can you add the following to your
|
Was facing the same error. Here's what the I got
VS Code version: 1.64.0 Was able to reproduce the issue on both Windows 10(C++ extension version 1.8.2) and Arch (C++ extension version: 1.8.3 Pre release) It loops infinitely here |
This seems to be a duplicate of #8760 Can you downgrade to 1.8.1? |
Yup that does the trick. Thanks! |
@WardenGnaw I switched C/C++ version to 1.8.1. and issue still persists. So I downgraded it further to 1.7.1 and issue still persists. Can you help please ? |
Please see the below output from the Debug Console: -> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (19547) ->=breakpoint-modified,bkpt={number="17",type="breakpoint",disp="keep",enabled="y",addr="0x00005555555780b0",func="libMultiRobotPlanning::NextBestAssignment<unsigned long, Location, libMultiRobotPlanning::Assignment<unsigned long, Location> >::constrainedMatching(std::set<std::pair<unsigned long, Location>, std::less<std::pair<unsigned long, Location> >, std::allocator<std::pair<unsigned long, Location> > > const&, std::set<std::pair<unsigned long, Location>, std::less<std::pair<unsigned long, Location> >, std::allocator<std::pair<unsigned long, Location> > > const&, std::set<unsigned long, std::less, std::allocator > const&, std::set<unsigned long, std::less, std::allocator > const&, std::map<unsigned long, Location, std::less, std::allocator<std::pair<unsigned long const, Location> > >&)",file="/home/aakash/Desktop/code/libMultiRobotPlanning/include/libMultiRobotPlanning/next_best_assignment.hpp",fullname="/home/aakash/Desktop/code/libMultiRobotPlanning/include/libMultiRobotPlanning/next_best_assignment.hpp",line="129",thread-groups=["i1"],times="1",original-location="next_best_assignment.hpp:129"}\n"},"seq":3263} |
@WardenGnaw As in by Debug Console, there is no error shown, so it seems that the issue I am facing is not same as #8760 . In that case, I request you to re-open this issue and help. |
@aakash0641 Is this issue fixed with https://github.com/microsoft/vscode-cpptools/releases/tag/1.8.4 ? |
@sean-mcmanus Apologies for delay in reply. I was not well. The issue is not fixed yet with 1.8.4 version of C/C++ extension. I am attaching couple of snaps below, which has snapshot of debug console, and installation evidence. 1st snap shows debug console. In the 2nd snap which shows the code, on stepping into function call "constrainedMatching" in line 53, the debug goes into infinite loop, which can be seen in top-right side action box, which shows a pause button in blue color. The 3rd snap shows 1.8.4 version installed. |
@sean-mcmanus @WardenGnaw Please let me know in case any more information is needed. I can do a screen-sharing session if that helps in easing the understanding and fixing of bug. |
@aakash0641 Can you please provide the logs in text format instead of images? Thank you. |
@WardenGnaw @sean-mcmanus Sure, please find attached a text file having log of debug console. You might have already understood but still I wish to highlight that I had placed a breakpoint within the problematic function, but on pressing either of F11/F10/F5 keys, the debugger does not stop at the inside-breakpoint and it looks like an infinite loop is running (attaching a supporting snap for this too) |
From the logs, it seems like we are waiting for GDB to complete the step-in request. Instead of stepping into
Let me know if you can hit the breakpoint in this case. |
@WardenGnaw This is exactly what I have done multiple times but unsuccessful to hit the breakpoint set in 1st line of |
@aakash0641 I am able to reproduce the issue with step-in. However, this is a GDB issue since it occurs without involving VS Code and the C/C++ Extension. Repro steps:
|
@WardenGnaw Thanks for this information. I wish to ask whether there is an alternative to GDB that can be used as a debugger with VSCode and C/C++ Extension ? Also, how to use it ? Meanwhile, I will file the bug in the suggested portal. |
This issue has been closed automatically because it's labeled as 'external'. |
You can try building with clang and building lldb-mi on linux, but that is a bit more complicated. I did notice that you were using GDB version 9.2. You could try upgrading the version of GDB and see if newer version is experiencing this problem. |
Yes, I upgraded to GDB version 11.2 and this resolved the problem. Thank you so much @WardenGnaw |
Bug type: Debugger
Describe the bug
constrainedMatching
(see attached image, line 53) but the control does not reach at that particular line during debug. Instead the execution goes into endless loop. On pressing pause icon, the debug does not stop. Only way is stop press the Stop icon. I had raised this issue with VSCode forum, but they said that the issue is with /extCpp Please see the link F11 or F10 in Debug mode over a particular function goes in endless loop vscode#142166To Reproduce

Please include a code sample and
launch.json
configuration.Steps to reproduce the behavior:
1.The code to produce bug is https://github.com/whoenig/libMultiRobotPlanning
2. Download the code from above link and follow instructions in it to configure and build using CMake in VSCode
3. Start debug mode using CMAKE tools extension in VSCode
4.
Reach the problematic line 53 (as shown in attached snap) which has function call. Press F11 / F10 / F5 and see the endless loop
5. Note that the function call is in a
hpp
file. That is, a function, which is defined within hpp file, is called inside the hpp file.Additional context
If applicable, please include logging by adding "logging": { "engineLogging": true, "trace": true, "traceResponse": true } in your
launch.json
Add any other context about the problem here including log or error messages in your Debug Console or Output windows.
Below is the content of
launch.json
:The text was updated successfully, but these errors were encountered: