From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4649A138334 for ; Mon, 17 Sep 2018 11:39:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0491EE09ED; Mon, 17 Sep 2018 11:39:03 +0000 (UTC) Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5233CE09AD for ; Mon, 17 Sep 2018 11:39:02 +0000 (UTC) Received: by mail-lj1-x236.google.com with SMTP id p6-v6so12852430ljc.5 for ; Mon, 17 Sep 2018 04:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=jHnfvGYxl7lhI9YCyXJHs7GWwEkalMS9yKZBHk82YDk=; b=fThcCwqXWdNKrJTtFyLYUCfOL9AvcUEbffRgap2/uaCxhp1B8kVqWIFIp0A2VWZAIU KG9Pgwry574KnoOpuIIHjUHARTzdqvd+YvIDCJl8ducRssgkTtZwrSPHHP7Z6eNm7OnP /AvMPJvrrSuK0tYEL+2z77QS3NihWY18A7W6Ls4+uM/PR3C3Fw43vFgLjxHbivz60rFW UwnjAeaEG2vqfBkvDsj9/wiKNovIu3mm5n1HMYIifpTrBA/mmcPnIbmg0iXyDdrvpGfS GjIW/pZOheRQ6IU6vYQOL81+a2WVFThBWSMy0xyKns02517vZ4FXSgsvKhvF5nHan/Hh 8s/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=jHnfvGYxl7lhI9YCyXJHs7GWwEkalMS9yKZBHk82YDk=; b=Di1nY81u3JfmW76yaRqSdQ6JiAEg7FO5rz/nGDBrf+jajFYiJxhl0A6kPbpSte9GkR sNNhwubpOA3KzR3nLc19qrMpGunJEDfcRoYx9samAeVzp4UDWo9X2AnIN122uB2g7N8o CB3ZMmvL9yDvXJGQ6A+KUm6fn0vHgABJEena2VWbdpAgfx3xEIyCrZNzqk5UK+lPFgsq DBRWWVnb211EUUDSJHCD6N52yHHEEGPEfod5S/f2LgmXxJgySeruRDhwT02wl9k7AzIb DCh+4UJ9vgydLecLccOu7spRZcU/SVLN2dxGAo1KqGbIxofj0CDJZ33kSnnEwB2JGtd3 3x9w== X-Gm-Message-State: APzg51DrWZCJZRV7ggsI7gja1XdoT/BdpzcF4kTU8VdstRXWi8UHIhaK JzBtYSLO1SYYnlJn+hTFuxZ8mCFiLm/0i9ch9pXilFROaZ4= X-Google-Smtp-Source: ANB0VdYZL26S4lA7BEh6OCDrCSAXRxNnzKYDwFyubjpCZNihx6qmQZhVALho3O8iK6WTrEX1kNPxr3BtXxLvcUb4Dh4= X-Received: by 2002:a2e:550b:: with SMTP id j11-v6mr15470848ljb.124.1537184340048; Mon, 17 Sep 2018 04:39:00 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Received: by 2002:a2e:8647:0:0:0:0:0 with HTTP; Mon, 17 Sep 2018 04:38:59 -0700 (PDT) In-Reply-To: References: <4F00875E-C631-4E2D-9C01-EA02AF9A5899@gmail.com> <0c14cbd4-4a28-f5ef-ebfd-1d3d494ca68c@st.com> <18df828e-9851-9476-8e6c-d5fc827d832b@st.com> From: R0b0t1 Date: Mon, 17 Sep 2018 13:38:59 +0200 Message-ID: Subject: Re: [gentoo-user] remote debugging python on embedded platform To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 6ed90b57-33af-49fb-9a59-0807ad11a8fc X-Archives-Hash: b9dd28c5a13ce9c0729d60c87b8f3ba4 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.