-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
Unable to run VSC SITL debugging #14689
Comments
Thanks for reporting, I'll take a look. |
I'm experiencing the same / similar issue. For me it's the standard_vtol that I'd need but isn't working. Current master, Ubuntu 18.04. I got 59 problems: If I click on debug anyway, the PX4 shell starts (mostly like normal) When I stop the debug session and try to launch another one, I get this: (How can I kill the PX4 daemon manually? So far I had to resort to a reboot of my laptop, but this is not very efficient...) I hope this can help you to find the underlying problem. Additionally, I can tell you that commit d32a80d still works to launch VSC debugger (but doesn't contain the bug I'm hunting...) |
Having the exact same issue as @ThomasRigi . |
Any progress on this topic so far? It still happens to me in the v1.11.0-beta2 Version. Any clues where to look for the reason behind this issue? |
I uninstalled VSC completely (including settings and extensions), updated the toolchain and reinstalled VSC with the workspace recommandations, but it still doesn't work. |
@ThomasRigi I found a workaround which works for me, maybe it does in your case as well. After you started the debugger through VSCode and it gets stuck waiting for connection, start in a separate terminal a gazebo sim (make px4_sitl gazebo_iris). After pressing the play button in the VSCode debugger it works as normal (as far as i tested at least). Hope it helps |
@notoriou5 Thank you for sharing the workaround! It also works with the HEADLESS=1 option to have the simulator up faster :) It's still not as convenient and there still are all the jagged red lines complaining about stuff being undefined etc but it helps greatly with debugging 👍 |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Could you give #15745 a try? |
So with #15745 running locally, the first time I start the debugger and select the type it hangs on But then the drone type selector pops up again and when reselecting the model it starts working. :) Also, all the broken "undefined identifiers" and other warnings/errors and red underlines have disappeared and I can again easily navigate through the code :D Looking forward to have this merged into master 👍 With the Dev Container I get the following error(s), but I don't really care as I now have it running locally: [0/9] git submodule Tools/sitl_gazebo I wouldn't be surprised if I missed an initialisation step, it was the first time I used the remote container feature of VSC. |
@ThomasRigi can you try it with a clean build? One awkward thing at the moment is that if the PX4 compile fails it still builds and launches gazebo first before giving you an error. Maybe at first make sure px4 builds by itself (clicking Build in vscode), then make sure you don't have any zombie px4* or gzserver processes, then try the gazebo debug target. My normal workflow is only going through the debug launch, but we need to track down where it's failing for you. |
Ok, now it works reliably. Hitting the build button in VSC before launching the debugger does the job. Previously I had some build files from having run the simulator over a terminal outside of VSC and (after closing the other simulation) I clicked directly on debug in VSC. I wouldn't have thought it makes a difference whether I compile the code outside or inside VSC, but apparently it does. Anyway, now I know how it works, so all good for me :) |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
To Reproduce

make px4_sitl gazebo_tailsitter
click on green play button
Error


Additional context
Forked firmware from be9f125 upstream
"mavsdk_tests: raise timeout for czspawn"
Commit on Apr 3, 2020
Forked sitl_gazebo from a928906 upstream
"Fix race condition in gimbal controller"
Commit on Apr 3, 2020
Ubuntu 18.04
The text was updated successfully, but these errors were encountered: