Gentoo Archives: gentoo-user

From: R0b0t1 <r030t1@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] remote debugging python on embedded platform
Date: Mon, 17 Sep 2018 10:36:15
Message-Id: CAAD4mYj=Q=tXWNzy+O0p9Uk3HXTQ1Dw8knayKZmkpD7DraAU-Q@mail.gmail.com
In Reply to: [gentoo-user] remote debugging python on embedded platform by Raffaele Belardi
1 On Mon, Sep 17, 2018 at 11:53 AM, Raffaele Belardi
2 <raffaele.belardi@××.com> wrote:
3 > (Moved from [pycharm-community vs pycharm-professional] thread)
4 >
5 > R0b0t1 wrote:
6 >> On Mon, Sep 17, 2018 at 10:54 AM, Raffaele Belardi
7 >>> I'd use Python to develop programs for fun on an ARM-linux embedded board, with the host
8 >>> PC running Gentoo. I suppose that for debugging on the target I'd need this feature:
9 >>> "Remote run/debug" which is available only in the (pycharm)Pro edition, right?
10 >>>
11 >>
12 >> Usually what I see is either sftp or rsync (over ssh) to the remote
13 >> computer, then ssh to run the updated files. Alternatively you can ssh
14 >> to the remote host and run vim within that session.
15 >>
16 >
17 > I suppose vim on Host + ssh for transfer/run would be fine for me.
18 >
19 > For debugging I saw some support for python is available in gdb but I'm not sure of the
20 > environment, would I run gdb on the host or on the target (via gdbserver)?
21 > Also, is gdb a viable solution given the interpreted nature of python or I'd better start
22 > off with some GUI/IDE?
23 >
24 > I normally use gdb/gdbserver for embedded C debugging so I'm fine with the gdb command
25 > line interface.
26 >
27
28 This is where it gets a bit weird... It seems there are multiple
29 custom remote debug implementations.
30
31 From some discussion on what PyCharm does (how it was broken by a
32 company firewall) it looks like it starts an ssh connection to the
33 target machine and runs pdb. PyDev may do something similar but it
34 looks like it replaces pdb with its own module.
35
36 Microsoft uses https://github.com/Microsoft/ptvsd. Visual Studio Code
37 is actually quite good and should run on Gentoo - it is open source,
38 as is their remote python debugger. I had forgotten about it but if
39 you want a GUI do strongly consider it.
40
41 Cheers,
42 R0b0t1

Replies

Subject Author
Re: [gentoo-user] remote debugging python on embedded platform R0b0t1 <r030t1@×××××.com>