Start a new topic
Not Taken

Display text data in return data area

When using the debug tool would like the PRINT commands to return the data in standard character format in the simulated return data area.  Some time I need to put debug statements into my onscreen code to debug a function and only see Hex data.

Since the debug tool does not have a single step mode this is the only way to see what's going on in the code.

This could be as simple as selecting between Hex and Character output.

1 person likes this idea

nothing to discuss about personal preferences ... everybody has his own ... but it is nevertheless nothing more than a personal preference ...

one like to read all in HEX, others like to see ASCII, others would like to have both ...

and I am not sure, if it makes a big sense to follow such ... because they are neither a functional error nor something which is really a unique improvement ...

The print statement is by design an easy method to output serial data, not to debug your code. You can do so, but if so don't expect that the design of such a command will be changed a lot to follow such a spezial usage ...

Anyway, for debugging you have a much better possibility at hand ...

    - just place one temporary Text-Object at top of your screen
    - name this object "debug" and set a maxlength of 254 characters
    - in case you need a debug message, just issue a debug.txt="Your Text" instead of your print command
    - in debug mode, you now can see all directly on screen without any change
    - and when all runs as expected, just delete this Text-Object again ...

I guess, that's much more easy for everybody to implement, than to change the editor in general ...


Actually that's what I ended up doing.  Messing up my design with some variable on the screen so I could see where the problem was.

I see there's a button on the bottom to allow putting values into a graph.  That had to take a lot of code to make happen.  Adding a check mark to output the data in text would be nice.

It also states that the output to the PRINT command is in plain text with no hex codes around it.  So I would expect the debug window to do that and not output hex values.  Not like I'm asking for Octal or anything.

when dealing with integer based systems such as an MCU

it is already stretching it to convert bytes to char or string

 - such is why libraries are large code size to do so

And which language the byte now is to be interpreted to again

 - it is never ending, especially with more global languages added

difficulty with print is which bytes shall be printed and which not

by default the first 32 bytes were never attempted to be printed

  - byte 00 to byte 31 are deemed non printable

When you are the programmer for (MCU side code)

 - you are making a specific decision on specific code

 - as such you can say this byte 3 needs to be char

But such specific rules do not work in standardization 

  across all user projects.

So what one sees as working, other see as bug

 - this is left to the user domain as per their specific want and need

Login or Signup to post a comment