Jump to content


Photo

Debug logging needed


  • Please log in to reply
8 replies to this topic

#1 jshaffstall

jshaffstall

    GMC Member

  • New Member
  • 8 posts

Posted 01 May 2012 - 02:05 PM

Is there a function to call to output a debug message that gets logged in the debugger window? I know about using show_message, but that's klunky and there's no history of previous messages. In the absence of a full-out debugger allowing stepping through lines of code, some form of debug logging is important for tracking down bugs. Since GMS is being targeted at professionals, I'm hoping I just missed finding this feature in the help.
  • 0

#2 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1407 posts
  • Version:Unknown

Posted 01 May 2012 - 02:11 PM

show_debug_message???

It's been in GameMaker for a long time - though I tend to find noone knows about it.

Russell
  • 1

#3 alexandervrs

alexandervrs

    GMC Member

  • GMC Member
  • 419 posts
  • Version:GM:Studio

Posted 01 May 2012 - 02:23 PM

show_debug_message???

It's been in GameMaker for a long time - though I tend to find noone knows about it.

Russell


Maybe because the messages are not directly visible in the main debugger window and we have to go to Tools > Show Messages.
In Flash when you do trace() then it shows the messages in the output window right away, maybe GM should do the same.
  • 0

#4 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1407 posts
  • Version:Unknown

Posted 01 May 2012 - 02:37 PM

They are output to the compile form which you should keep open - even in non-debug...

Also if you open windows in the debugger then they will be reopened when the debugger restarts...

Russell
  • 0

#5 alexandervrs

alexandervrs

    GMC Member

  • GMC Member
  • 419 posts
  • Version:GM:Studio

Posted 01 May 2012 - 02:42 PM

Also if you open windows in the debugger then they will be reopened when the debugger restarts...


Ah, this one is very useful.
  • 0

#6 jshaffstall

jshaffstall

    GMC Member

  • New Member
  • 8 posts

Posted 01 May 2012 - 03:03 PM

show_debug_message???

It's been in GameMaker for a long time - though I tend to find noone knows about it.


That's exactly what I was looking for, thanks! I did finally find it in the help, but it was embedded in the general Debugging topic, not listed as a separate entry.
  • 0

#7 locohost

locohost

    GMC Member

  • GMC Member
  • 459 posts
  • Version:GM:Studio

Posted 25 May 2012 - 04:52 PM

They are output to the compile form which you should keep open - even in non-debug...

Also if you open windows in the debugger then they will be reopened when the debugger restarts...

Russell


I can't find the show_debug_messages anywhere. By saying "output to the compile form" I thought you meant the lower window in the IDE that shows the compile progress. However I see none of my show_debug_messages in there so I must be wrong. I guess I don't know what "the compile form" is.

EDIT: There is what looks like a white debugger window that opens in Chrome as the game is starting up. However, my game graphics completely cover that so I have no way of seeing it.

Edited by locohost, 25 May 2012 - 04:55 PM.

  • 0

#8 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1407 posts
  • Version:Unknown

Posted 25 May 2012 - 06:10 PM

Ah! OK you are working in HTML5 in that case run in Debug and there is a scrolling text box underneath your game all the show_debug_message output should go to that.

Russell
  • 0

#9 locohost

locohost

    GMC Member

  • GMC Member
  • 459 posts
  • Version:GM:Studio

Posted 25 May 2012 - 06:46 PM

Ah! OK you are working in HTML5 in that case run in Debug and there is a scrolling text box underneath your game all the show_debug_message output should go to that.

Russell


Yeah I kinda figured. That's what my "Edit" is about. However, I have no way to see that underneath the game graphics so I'm still confused :confused:
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users