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 1BF86138334 for ; Tue, 18 Sep 2018 05:21:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 86DE5E0DEB; Tue, 18 Sep 2018 05:21:03 +0000 (UTC) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (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 EC105E0DE2 for ; Tue, 18 Sep 2018 05:21:02 +0000 (UTC) Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id w8I5JXjk029479 for ; Tue, 18 Sep 2018 07:21:01 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2mgryexxbm-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 18 Sep 2018 07:21:01 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 91ACA31 for ; Tue, 18 Sep 2018 05:21:00 +0000 (GMT) Received: from Webmail-eu.st.com (sfhdag7node2.st.com [10.75.127.20]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 4DE4313EA for ; Tue, 18 Sep 2018 05:21:00 +0000 (GMT) Received: from [10.50.186.1] (10.75.127.49) by SFHDAG7NODE2.st.com (10.75.127.20) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Tue, 18 Sep 2018 07:20:59 +0200 Subject: Re: [gentoo-user] remote debugging python on embedded platform To: References: <4F00875E-C631-4E2D-9C01-EA02AF9A5899@gmail.com> <0c14cbd4-4a28-f5ef-ebfd-1d3d494ca68c@st.com> <18df828e-9851-9476-8e6c-d5fc827d832b@st.com> From: Raffaele Belardi Message-ID: <4cde2aad-3de3-ef1e-f1b6-bed71fae90f5@st.com> Date: Tue, 18 Sep 2018 07:24:16 +0200 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.9.1 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 In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.49] X-ClientProxiedBy: SFHDAG2NODE1.st.com (10.75.127.4) To SFHDAG7NODE2.st.com (10.75.127.20) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-17_13:,, signatures=0 X-Archives-Salt: 549f9eca-826d-4970-a6e9-b27583748836 X-Archives-Hash: 4c1361cf48e17852c52e605a0d7f1802 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