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 B1CEE138334 for ; Mon, 17 Sep 2018 10:36:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7960EE0A62; Mon, 17 Sep 2018 10:36:07 +0000 (UTC) Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) (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 BD250E09D7 for ; Mon, 17 Sep 2018 10:36:06 +0000 (UTC) Received: by mail-lf1-x12f.google.com with SMTP id x26-v6so13081213lfi.7 for ; Mon, 17 Sep 2018 03:36:06 -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=EZfhF6fPgA1HxdSS1lRuCAoj8XrhxEmqb4lQOnpKh10=; b=c1dRvOqt1W/6tm5i9jg4DJ1RVCuvCkoands4h8arieWnrxQVYJjOcZ4qXeUAMOWP/6 PvH0N8WC4Bk0q29pHT1+6QRKZYohGKS/mkWnNszml2EhiAIrJJpkFYPl3y7L5cKQXY2P KrK5ww1QxgmeNdR2CwM2jTdYPIVet2Bhe+vKhNSemQoF2mZymbhV6zEZiO0q1FxuzY8Z iaR+Q+3XcrBsFw8xL9Jc9Omr8OZI2Y5VTiwyZOUQdiU3f7utVMUkcUPYmAFXmeqRXwza kkb8Qc8Zjgc7EvHxjZnQbAqGckaPco+EYM7ntMTt/vlx1qZdx94DKcgtkmfmkYjXV4pr +Blw== 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=EZfhF6fPgA1HxdSS1lRuCAoj8XrhxEmqb4lQOnpKh10=; b=FPB2C2E17f124IZ6jmD5yHCnzUyYfHMD3Ha5bZAbsDzkpqdsZuO4UQq+9dgK03Q2/K aRc8BNtUbZmQ8W6DEIkoSeiwrjm1SZnqA2wQTHqgJJBrCQbLTo/zTRag7oDMZW/uTbP1 4bqlDSuL+iAWs7n/BKKxMnZua9ylo9iw3jNPafKNf+u8vOsI1iJcokXbFCelTos5HBw7 QggOZuihGEaKgfXqViYYji+MeLHSuqQdEnQpYicolf5uOksvchkviOsidwZ2WaO+mrqT 7VL0cdwPKYEJd/UHMXkGqIkOAu7RkZGe/fMD0QboTNJTgG3DlOc6tx/aePjgL4EYZrfN mYRg== X-Gm-Message-State: APzg51DHDlmXDwQrt+Nbx48QIn1ZuyLifWz1cn082uuUQ0BQ1YCah7Am yKfW18xEegHgLdpyFgKsj5Q39zM4P0Xhj9re0KHX9oZJK1E= X-Google-Smtp-Source: ANB0Vdaovev3oe2KQK/GC8zPMz2GGEsGdeMnOFZNfOH3xTxMoc2xbHXn0Bka8hLnd6jjkKs79nJef0reYdra1dTVpok= X-Received: by 2002:a19:dd8a:: with SMTP id w10-v6mr1544847lfi.97.1537180564420; Mon, 17 Sep 2018 03:36:04 -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 03:36:03 -0700 (PDT) In-Reply-To: <18df828e-9851-9476-8e6c-d5fc827d832b@st.com> 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 12:36:03 +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: 09f87bd6-47de-4f2d-85f3-61b45a2bf5ca X-Archives-Hash: 193ecee6e6b82fcc33e18cf44b30dbbb 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