Author Topic: Debugging via console  (Read 357 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1957
Debugging via console
« on: December 28, 2019, 08:14:38 PM »
Does anyone know if it’s possible to scroll the console.

I’m trying to debug some Lua and the important stuff is at the beginning and the text feedback in the console is verbose and the stuff I need to read gets lost/hidden.

Cheers

Garry

Walter Schulz

  • Contributor
  • Hero Member
  • *****
  • Posts: 7013
Re: Debugging via console
« Reply #1 on: December 28, 2019, 08:38:57 PM »
Smartphone -> Video -> Playback. Done.
Photogs and videographers: Assist in proof reading upcoming in-camera help!. Your input is wanted and needed!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1957
Re: Debugging via console
« Reply #2 on: December 28, 2019, 09:59:09 PM »
Another good reason to get a smart phone  ;)

Yup, I don’t have one.

But I do have a means to video the screen.  :)

Cheers

Garry

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3583
  • Blunt and to the point
Re: Debugging via console
« Reply #3 on: December 29, 2019, 02:34:49 AM »
Can you dump the console to a text file with LUA.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 1957
Re: Debugging via console
« Reply #4 on: December 29, 2019, 08:46:28 AM »
@Audionut

I looked at that, but the only console function is to write a specific piece of text.

I couldn't work out how to direct the console to a file.

Thanks for your feedback, I'm sure I'll cope.

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12353
  • Emergencies only
Re: Debugging via console
« Reply #5 on: January 04, 2020, 10:36:20 PM »
If all the messages come from Lua, you can save them to a file. For example, api_test.lua does just that.

Otherwise, this functionality needs to be implemented somehow in the ML core. For my needs, I define CONSOLE_DEBUG in console.c; it works, but...

This functionality should be available in the Debug menu, alongside with some kind of buffering. Integration with g3gg0's trace module could make sense, but that won't catch early startup messages.