Increasing length of console log

Typically: "How do I... ", "How can I... " questions
Post Reply
RobAtLab
Posts: 92
Joined: 10 Jan 2018, 17:49

Increasing length of console log

Post by RobAtLab »

I've been doing some tests but found a few buggy effects in the code (internal lua scripts) that I've written as my controllers. I've resorted to inserting lots of print statements into my code to output it to the console, this way I can diagnose where bugs in my controller code lie. But I'm finding that the console runs out and erases the earliest lines of printing such that I can't scroll up to see the lines I really need to read. I'm tracking down one of those really nasty bugs where the effects which cause a crash are not visible until many timesteps after the actual problem occured, many lines after the print statements which would reveal what is going on. Is there any way to make the console larger so I can read more lines of printing? I did try using the terminal (I'm on linux) whichm opens alongside v-rep but when I printed to terminal much of the stuff, esepcially lua tables, came out as garbled 0x... hex style values and memeory addresses rather than as readable {value,0,"word,10} types of data one sees when printing to V-REP's own console.

My operating system: Ubuntu linux
My version of V-REP: 3.5.0

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: Increasing length of console log

Post by fferri »

The number of lines that are kept as scrollback buffer it does not depend by V-REP, it's a setting in your terminal application.

The latest release (3.5.1) has some utility functions (print, printf) that are able to print tables contents.

RobAtLab
Posts: 92
Joined: 10 Jan 2018, 17:49

Re: Increasing length of console log

Post by RobAtLab »

Set by my terminal application? Just to be clear I am talking here about the console at the bottom of V-REP which is printed to using print() not the one you get to if you use print=printToConsole. I couldn't do my printing to the linux terminal using print=printToConsole because the linux terminal wouldn't print tables, although it would print plenty of lines before running out of scroll space and deleting the older lines. Are you saying that editing my linux operating system settings so more lines will print in my usual terminal will make the printed console inside V-REP longer too? I'll give that a go soon.

From a V-REP lua script where does printf go, to V-REP's internal bottom of screen console? to your operating system terminal? or to an auxillary console?

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: Increasing length of console log

Post by coppelia »

In next release the status bar buffer will be much larger. You have following workaround: you can simply use printToConsole to send the text to the console instead of the status bar. print, printf and printToConsole are defined in sim.lua.

Cheers

Post Reply