How To Use VISUAL STUDIO CODE to Remotely Program + DEBUG Python for any LINUX Machine (or JETSON)

preview_player
Показать описание

In this video we will see how we can use #visualstudiocode to remotely program and debug #python scripts for any #linux machine.

This video uses #Jetson #xavier but you can still follow if you have any other #linux or #ubuntu machine. Sometimes there can be scenarios where you do not have physical access to the machine and then you have to program it as well. In this scenario, the best is to use #visualstudiocode remote ssh feature to remotely connect to the machine. You can even use it to debug your code as well. Just follow along the video and you can easily setup your machine for remote development.

Рекомендации по теме
Комментарии
Автор

Fantastic ! This made my life so easy :)

certainly_unsure
Автор

thank you very useful. I would like to do the remotely but with c++ and cuda. Any suggestion ?

badingamusshca
Автор

can u tell me ur python extension settings? like language server settings.

pricity
Автор

Thanks for your interesting video. But how can I debug something like "cat myfile | python-script-1.py | python-script-2.py"? I tried to use debugpy. But I have to call both scripts like so "python -m debugpy --listen 5678 --wait-for-client python-script-1.py" and I don't know what to do if I want to debug both scripts at once. Perhaps there is a way to bring vs code into listen mode and connect to it from the cmdline scripts? This is the way I was used to work with when remote debugging PHP with xdebug.

uwegenosdude
Автор

Great video ... I do have one question ... For my case, the python script I want to debug is actually started by another process that I would start outside of the VS CODE IDE. I've done something similar in C with Eclipse and I do attach to process. I guess that is the difference. You hit debug and instead I'd hit attach to process.

erikpanzer
Автор

hi, I followed your instructions for debugging python3 on beaglebone black .. the installation was successful but I have two main problems, if you can help me I am very happy .. first question .. I state that VSC connects correctly to the card and the python extension is active on the remote device .. when I try to insert a breakpoint by running the debug with F5 the python script does not stop, as if it did not recognize the breakpoint inserted during the execution of the same .. second question, my script is similar to yours it is based on openCV and when it is run remotely in the VSC console I get the following message : Unable to init server: Could not connect: Connection refused
(gray image:3572): Gtk-WARNING **: 08:26:07.608: cannot open display:, consider that if I run the python script locally on the board it works correctly and the window with the image of a cmos cam opens ..
Do you have any ideas on how to solve these problems?
Thanks for any hints you can give me. .
Robert

robertvsc
Автор

thanks a lot! One question if you could help me: any idea why debugger does not stop at breakpoint?

munteanionut
Автор

Nice short and precise video .. When I ran ran debugpy listen command in Linux machine it is saying can’t listen for client connection: address is already in use.. I did the debugging before in the same port it was working..I found the reason the port somehow didn’t stopped lasttime. It was still listening. I killed that process then worked..

pradya
Автор

why my python intellisense of cv2 isn't working?

pricity
join shbcf.ru