I am using the print thing now so that helps s lot. The problem I have with loading the realtime subsystem is that when I screw up I already have a module loaded that is sometimes difficult to remove without rebooting the system.
On 2014-07-01 18:18, Charles Steinkuehler wrote: > On 7/1/2014 10:55 AM, Marius Liebenberg wrote: >> On 2014-07-01 17:37, Sebastian Kuzminsky wrote: >>> On 7/1/14 02:40 , Marius Liebenberg wrote: >>>> What is the best way (or any way) to debug python scripts that are >>>> loaded as hal components. I need to create a break point to see what >>>> data arrived into a variable. >>>> >>>> Currently I am loading the script with halrun so it does not operate >>>> under linuxcnc per say. Until it works. >>> I usually use "print" for that kind of debugging. >> I am not a python programmer so it is a bit of a steep learning curve. I >> will try that. > It is not necessary to launch python HAL scripts from halcmd or the hal > file directly. Instead, just run the code you're testing directly from > the command line. > > When I was writing the python thermistor code for my 3D printer, I just > started up the realtime subsystem (launch LinuxCNC, run "realtime > start", etc) and then manually launched the Python script from the > command line. This way you can interact with python (see the print > outputs, provide keyboard input, etc), and you should be able to even > use a debugger normally. I never had anything I couldn't work out by > just manually typing into python (which can be very interactive, like a > shell) so I didn't dig into the availability of an actual debugger. > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > > > _______________________________________________ > Emc-developers mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/emc-developers -- Regards /Groete Marius D. Liebenberg +27 82 698 3251 +27 12 743 6064 QQ 1767394877 ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ Emc-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/emc-developers
