Re: [gentoo-user] remote debugging python on embedded platform
R0b0t1 wrote: > On Mon, Sep 17, 2018 at 12:36 PM, R0b0t1 wrote: >> On Mon, Sep 17, 2018 at 11:53 AM, Raffaele Belardi >> wrote: >>> (Moved from [pycharm-community vs pycharm-professional] thread) >>> Usually what I see is either sftp or rsync (over ssh) to the remote computer, then ssh to run the updated files. Alternatively you can ssh to the remote host and run vim within that session. >>> >>> I suppose vim on Host + ssh for transfer/run would be fine for me. >>> >>> For debugging I saw some support for python is available in gdb but I'm not >>> sure of the >>> environment, would I run gdb on the host or on the target (via gdbserver)? >>> Also, is gdb a viable solution given the interpreted nature of python or >>> I'd better start >>> off with some GUI/IDE? >> >> This is where it gets a bit weird... It seems there are multiple >> custom remote debug implementations. >> >> From some discussion on what PyCharm does (how it was broken by a >> company firewall) it looks like it starts an ssh connection to the >> target machine and runs pdb. PyDev may do something similar but it >> looks like it replaces pdb with its own module. >> >> Microsoft uses https://github.com/Microsoft/ptvsd. Visual Studio Code >> is actually quite good and should run on Gentoo - it is open source, >> as is their remote python debugger. I had forgotten about it but if >> you want a GUI do strongly consider it. > > Also this, sorry - https://github.com/quantopian/qdb. I had a quick look at the native python debugger pdb, I suppose that it should be fine till I'll be good enough with coding to crash the interpreter :-). I'll edit on the host ('USE=python emerge vim') and share mounts via NFS. Thanks for the qdb hint, looks promising. VSCode license has some privacy statements that I don't like. thanks, raffaele
Re: [gentoo-user] remote debugging python on embedded platform
On Mon, Sep 17, 2018 at 12:36 PM, R0b0t1 wrote: > On Mon, Sep 17, 2018 at 11:53 AM, Raffaele Belardi > wrote: >> (Moved from [pycharm-community vs pycharm-professional] thread) >> >> R0b0t1 wrote: >>> On Mon, Sep 17, 2018 at 10:54 AM, Raffaele Belardi I'd use Python to develop programs for fun on an ARM-linux embedded board, with the host PC running Gentoo. I suppose that for debugging on the target I'd need this feature: "Remote run/debug" which is available only in the (pycharm)Pro edition, right? >>> >>> Usually what I see is either sftp or rsync (over ssh) to the remote >>> computer, then ssh to run the updated files. Alternatively you can ssh >>> to the remote host and run vim within that session. >>> >> >> I suppose vim on Host + ssh for transfer/run would be fine for me. >> >> For debugging I saw some support for python is available in gdb but I'm not >> sure of the >> environment, would I run gdb on the host or on the target (via gdbserver)? >> Also, is gdb a viable solution given the interpreted nature of python or I'd >> better start >> off with some GUI/IDE? >> >> I normally use gdb/gdbserver for embedded C debugging so I'm fine with the >> gdb command >> line interface. >> > > This is where it gets a bit weird... It seems there are multiple > custom remote debug implementations. > > From some discussion on what PyCharm does (how it was broken by a > company firewall) it looks like it starts an ssh connection to the > target machine and runs pdb. PyDev may do something similar but it > looks like it replaces pdb with its own module. > > Microsoft uses https://github.com/Microsoft/ptvsd. Visual Studio Code > is actually quite good and should run on Gentoo - it is open source, > as is their remote python debugger. I had forgotten about it but if > you want a GUI do strongly consider it. Also this, sorry - https://github.com/quantopian/qdb.
Re: [gentoo-user] remote debugging python on embedded platform
On Mon, Sep 17, 2018 at 11:53 AM, Raffaele Belardi wrote: > (Moved from [pycharm-community vs pycharm-professional] thread) > > R0b0t1 wrote: >> On Mon, Sep 17, 2018 at 10:54 AM, Raffaele Belardi >>> I'd use Python to develop programs for fun on an ARM-linux embedded board, >>> with the host >>> PC running Gentoo. I suppose that for debugging on the target I'd need this >>> feature: >>> "Remote run/debug" which is available only in the (pycharm)Pro edition, >>> right? >>> >> >> Usually what I see is either sftp or rsync (over ssh) to the remote >> computer, then ssh to run the updated files. Alternatively you can ssh >> to the remote host and run vim within that session. >> > > I suppose vim on Host + ssh for transfer/run would be fine for me. > > For debugging I saw some support for python is available in gdb but I'm not > sure of the > environment, would I run gdb on the host or on the target (via gdbserver)? > Also, is gdb a viable solution given the interpreted nature of python or I'd > better start > off with some GUI/IDE? > > I normally use gdb/gdbserver for embedded C debugging so I'm fine with the > gdb command > line interface. > This is where it gets a bit weird... It seems there are multiple custom remote debug implementations. >From some discussion on what PyCharm does (how it was broken by a company firewall) it looks like it starts an ssh connection to the target machine and runs pdb. PyDev may do something similar but it looks like it replaces pdb with its own module. Microsoft uses https://github.com/Microsoft/ptvsd. Visual Studio Code is actually quite good and should run on Gentoo - it is open source, as is their remote python debugger. I had forgotten about it but if you want a GUI do strongly consider it. Cheers, R0b0t1
[gentoo-user] remote debugging python on embedded platform
(Moved from [pycharm-community vs pycharm-professional] thread) R0b0t1 wrote: > On Mon, Sep 17, 2018 at 10:54 AM, Raffaele Belardi >> I'd use Python to develop programs for fun on an ARM-linux embedded board, >> with the host >> PC running Gentoo. I suppose that for debugging on the target I'd need this >> feature: >> "Remote run/debug" which is available only in the (pycharm)Pro edition, >> right? >> > > Usually what I see is either sftp or rsync (over ssh) to the remote > computer, then ssh to run the updated files. Alternatively you can ssh > to the remote host and run vim within that session. > I suppose vim on Host + ssh for transfer/run would be fine for me. For debugging I saw some support for python is available in gdb but I'm not sure of the environment, would I run gdb on the host or on the target (via gdbserver)? Also, is gdb a viable solution given the interpreted nature of python or I'd better start off with some GUI/IDE? I normally use gdb/gdbserver for embedded C debugging so I'm fine with the gdb command line interface. thanks, raffaele