Inserting breakpoints ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stef Mientki

    #1

    Inserting breakpoints ...

    hello,

    for the simulation of some micro language (JAL),
    the original language is (with a minimal effort) translated into Python,
    after which the code is run in Python.

    I want to add a call to a debug routine,
    called JSM(linenr), which performs task like wait, update user feedback, etc.

    Now I can't find a nice solution,
    to add the debug call in a if/for/while statement.


    The orginal language looks like this
    <Orginal Language>
    For 16 * hardware_column loop
    Write_lcd_2byte s ( write_text , 0 )
    </Orginal Language>


    This attempt doesn't work, because apparently I've to choose between
    - 1 statement behind the ":"
    - all statements in the line below
    <Python attempt 1>
    for xxx in xrange ( 16 * hardware_column ): JSM(78)
    Write_LCD_2Byte s ( write_text , 0 ) ;JSM(79)
    </Python attempt 1>


    This works, but doesn't give a nice output
    <Python attempt 2>
    for xxx in xrange ( 16 * hardware_column ):
    JSM(78)
    Write_LCD_2Byte s ( write_text , 0 ) ;JSM(79)
    </Python attempt 2>


    any other ideas ?

    thanks,
    Stef Mientki
  • Gabriel Genellina

    #2
    Re: Inserting breakpoints ...

    En Sat, 16 Jun 2007 10:22:34 -0300, Stef Mientki
    <S.Mientki-nospam@mailbox. kun.nlescribió:
    for the simulation of some micro language (JAL),
    the original language is (with a minimal effort) translated into Python,
    after which the code is run in Python.
    >
    I want to add a call to a debug routine,
    called JSM(linenr), which performs task like wait, update user feedback,
    etc.
    This works, but doesn't give a nice output
    <Python attempt 2>
    for xxx in xrange ( 16 * hardware_column ):
    JSM(78)
    Write_LCD_2Byte s ( write_text , 0 ) ;JSM(79)
    </Python attempt 2>
    Try sys.settrace()

    --
    Gabriel Genellina

    Comment

    • Stef Mientki

      #3
      Re: Inserting breakpoints ...

      Gabriel Genellina wrote:
      En Sat, 16 Jun 2007 10:22:34 -0300, Stef Mientki
      <S.Mientki-nospam@mailbox. kun.nlescribió:
      >
      >for the simulation of some micro language (JAL),
      >the original language is (with a minimal effort) translated into Python,
      >after which the code is run in Python.
      >>
      >I want to add a call to a debug routine,
      >called JSM(linenr), which performs task like wait, update user
      >feedback, etc.
      >This works, but doesn't give a nice output
      ><Python attempt 2>
      >for xxx in xrange ( 16 * hardware_column ):
      > JSM(78)
      > Write_LCD_2Byte s ( write_text , 0 ) ;JSM(79)
      ></Python attempt 2>
      >
      Try sys.settrace()
      >
      thanks Gabriel,

      that might be a good way to go,
      I'll study that in the near feature,
      (can't find the easy to read details right now :-(

      cheers,
      Stef Mientki

      Comment

      Working...