-
Notifications
You must be signed in to change notification settings - Fork 111
Add vscode launch file for remote debugging in the BlueOS container #3457
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
base: master
Are you sure you want to change the base?
Add vscode launch file for remote debugging in the BlueOS container #3457
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAutomate VS Code remote debugging setup by embedding VS Code configuration into the BlueOS container image, including recommended extensions and a Python attach launch profile. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Williangalvani - I've reviewed your changes - here's some feedback:
- Use VS Code's devcontainer.json in a
.devcontainer
folder (rather than copying.vscode
in the Dockerfile) to configure remote debugging without baking IDE settings into the image. - If you do need to copy
.vscode
, guard that step behind a build argument or separate dev-only stage so production images remain clean.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Use VS Code's devcontainer.json in a `.devcontainer` folder (rather than copying `.vscode` in the Dockerfile) to configure remote debugging without baking IDE settings into the image.
- If you do need to copy `.vscode`, guard that step behind a build argument or separate dev-only stage so production images remain clean.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
while that makes sense in theory, how would it work when I'm developing inside a container inside a remote host? |
17a2c86
to
cf3cdf1
Compare
cf3cdf1
to
00467a2
Compare
LGTM, tested locally and it's working! |
00467a2
to
07720ba
Compare
@ES-Alexander can you turn my half-assed instructions into something usable? Pleeeeease? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Williangalvani - I've reviewed your changes - here's some feedback:
- In the Dockerfile, chown the .vscode directory to the pi user (e.g. RUN chown -R pi:pi /home/pi/.vscode) to avoid permission issues when debugging.
- Rather than baking .vscode into the core image, consider using a devcontainer.json or docker-compose override for VS Code debugging to keep your production image clean.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the Dockerfile, chown the .vscode directory to the pi user (e.g. RUN chown -R pi:pi /home/pi/.vscode) to avoid permission issues when debugging.
- Rather than baking .vscode into the core image, consider using a devcontainer.json or docker-compose override for VS Code debugging to keep your production image clean.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
This is tested and working as is.
it does look like devcontainer.json could be used here. I'll look into it |
Nope, it looks like it can't do what we need. |
You should see this when opening the Repo. install the extensions.


Ctrl+shift+p
type ssh and pick Connect to Host
Enter the pi's host and user
Accept key and input password as needed.
The arrow button connects this vscode instance to the remote. the window button opens it in a new instance.






Wait as the server gets downloaded
Switch to Dev containers once attached to the pi
attach to the container
Install python debugger extension on the container.
Open /home/pi as a workspace. That's where our service files live, and where the vscode debugger configuration is being saved.
Open any .py file, go to the debugger tab, use this task

and start debugging =]

Notes:
Summary by Sourcery
New Features:
Summary by Sourcery
Enable remote debugging of services in the BlueOS container by bundling VS Code launch settings and extension recommendations into the container image
New Features:
Enhancements: