Author Topic: Debug plugin and module  (Read 4202 times)

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Debug plugin and module
« on: January 29, 2017, 04:24:03 PM »
Debug is a plugin for the AttractMode front end. It can reload the layout with a user definable key press.

https://github.com/keilmillerjr/debug-plugin

It would be cool if I could have calls in the layout to the plugin class. I could then do on screen debug printing. Mac build has an issue with paths when running from terminal (when calling for a module from a layout within the ~/.attract location, it doesn’t look within the app package location), which means I have to run the package with no terminal.

Any ideas of what else to include in the debug plugin?

UPDATE:

I added a module!

https://github.com/keilmillerjr/debug-module

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Debug plugin
« Reply #1 on: January 29, 2017, 06:58:35 PM »
Nice!

With the old ExtendedObjects I worked on (not really useful anymore), I had a pretty handy debugger which could show a few configurable lines of text at the top and even added an outline of each object, with a line of text at the top to show properties:

https://github.com/liquid8d/attract-extra/blob/master/modules/extended/extensions/debugger/debugger.nut

This is part of what it looked like:
https://www.youtube.com/watch?v=r7ovcKWgBes

It helped for certain things (animations mostly), but was a bit extreme. Now I primarily just use a debug background (grid for aspect/resolution) shown under the objects for positioning, and add a debug text object with a print_debug(msg) function to print to it.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Debug plugin
« Reply #2 on: January 29, 2017, 07:05:11 PM »
Nice!

With the old ExtendedObjects I worked on (not really useful anymore), I had a pretty handy debugger which could show a few configurable lines of text at the top and even added an outline of each object, with a line of text at the top to show properties:

https://github.com/liquid8d/attract-extra/blob/master/modules/extended/extensions/debugger/debugger.nut

This is part of what it looked like:
https://www.youtube.com/watch?v=r7ovcKWgBes

It helped for certain things (animations mostly), but was a bit extreme. Now I primarily just use a debug background (grid for aspect/resolution) shown under the objects for positioning, and add a debug text object with a print_debug(msg) function to print to it.

Printing a message function was what I was thinking of as well! With a module, this is possible. As a plugin, I cant see a way to interact between layout and plugin. Whats your grid like? Right now I am using a percent function for all of my positioning and sizing. Seems to work ok for me so far. Would showing the ticks like in your video be useful for most with animations?

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Debug plugin
« Reply #3 on: January 29, 2017, 07:27:44 PM »
Showing ticks and properties real-time was more useful to me to make sure it was doing the exact values when I was making the animation module. It's probably not that useful in for layout creation, but the grids definitely are.. I have some of my grids and the psds for them here :)

https://github.com/liquid8d/attract-extra/tree/master/extras

I'm pretty sure a layout can interact with a plugin or possibly vice-versa, but I really haven't messed with them enough to be sure how it works.
« Last Edit: January 29, 2017, 07:31:37 PM by liquid8d »

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Debug plugin
« Reply #4 on: February 17, 2017, 10:13:36 PM »
Well, I added a debug module. Hopefully now I will proceed to add features to both.

https://github.com/keilmillerjr/debug-module