On Sun, 2020-03-08 at 13:25 +0100, Helge Kruse wrote:
>
> Am 04.03.2020 um 19:15 schrieb Gerhard Sittig:
> > On Wed, 2020-03-04 at 17:19 +0100, Helge Kruse wrote:
> >> How can I setup a debugger (I hope WinPDB, pdb would also be okay) on
> >> my Windows 10 PC?
> >> How can I attach the debugger to the running PulseView process, or can
> >> I start the program from the debugger?
> >
> > Have you seen the paragraph on WinPDB in the HOWTO page that you
> > refer to above?
> Yes, I did. Honestly I don't understand it. I looked for winpdb at
> http://www.winpdb.org/ and found the web site down. Searching for winpdb
> I found https://github.com/bluebird75/winpdb.

Sorry, your phrase "How can I setup a debugger (I hope WinPDB [...])"
made me assume that you know this tool and already have it at hand and
are familiar with its features. And you repeat this phrase again,
which suggests a strong preference.

> > Use the embedded debugger feature, because the
> > protocol decoder that is written in Python runs inside a host
> > application and thus cannot be used like a regular script or
> > standalone application.
> So added these lines
>      import rpdb2
>      rpdb2.start_embedded_debugger("pd")
>
> This results in an error message when I start sigrok-cli:
> --
> C:\Data>sigrok-cli  -P i2c,exc80h  -i r2.sr
> srd: ImportError: Failed to create exc80h instance: No module named 'rpdb2'
> srd: Traceback (most recent call last):
>   File "C:\ProgramData\libsigrokdecode\decoders\exc80h\pd.py", line 56,
> in __init__
>     import rpdb2
> ImportError: No module named 'rpdb2'
>
> Failed to instantiate protocol decoder exc80h.
> --
>
> So I think, I need to add rpdb2 to the sigrok's python library. ProcMon
> (somthing similar to strace) tells me that sigrok-cli reads python from
> C:\Program Files (x86)\sigrok-cli\python34.dll. Further the file
> python34.zip is read. This file includes a lot of .PY files that would
> resists in the lib directory of a normal python installation.

Sorry, this is the part that I cannot speak for, I'm not familiar
with software development on Windows. From personal experience I
can tell that remote debugging with WinPDB works on Linux. That's
why I added the information to the sigrok wiki after all. The
trick was getting WinPDB to work with Python 3 (which I don't
have notes on any longer when debugging became obsolete here).
But once the WinPDB tool works, it also does with sigrok PDs.

The difference may be that on Linux the application uses the
system's Python runtime, and thus has locally installed modules
available. This may not be the case for the binary Windows
installation that you appear to run, but this is just a guess on
my side (see above, don't have first hand experience there).


virtually yours
Gerhard Sittig
--
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.


_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to