Jump to content


Photo

Debug mode what exactly do?


  • Please log in to reply
13 replies to this topic

#1 RacerBG

RacerBG

    GMC Member

  • GMC Member
  • 193 posts
  • Version:GM8

Posted 23 April 2012 - 04:31 PM

I had tried only once this but for me there is not any difference between debug mode and normal mode game running. Let's say I have a problem what can I do with debug mode? For me there is not any difference..........Posted Image
  • 0

#2 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 04:45 PM

I had tried only once this but for me there is not any difference between debug mode and normal mode game running. Let's say I have a problem what can I do with debug mode? For me there is not any difference..........Posted Image

One of the handy components of debug mode is that it allows you to continuously watch the state of variables. For example, if you want to know where the enemy is when he is off screen, double-click under the Expression column to add something like obj_enemy.x

Now you can watch the variable change as needed. Debug also allows you to restart the game, pause it, and set the speed.

For a quick view of things, start your game in debug mode, then click Tools... Show Global Variables in the debug window. Enjoy!
  • 0

#3 RacerBG

RacerBG

    GMC Member

  • GMC Member
  • 193 posts
  • Version:GM8

Posted 23 April 2012 - 04:50 PM


I had tried only once this but for me there is not any difference between debug mode and normal mode game running. Let's say I have a problem what can I do with debug mode? For me there is not any difference..........Posted Image

One of the handy components of debug mode is that it allows you to continuously watch the state of variables. For example, if you want to know where the enemy is when he is off screen, double-click under the Expression column to add something like obj_enemy.x

Now you can watch the variable change as needed. Debug also allows you to restart the game, pause it, and set the speed.

For a quick view of things, start your game in debug mode, then click Tools... Show Global Variables in the debug window. Enjoy!


Just a moment, how I can do this things? Thanks in advance.
  • 0

#4 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 04:59 PM

Just a moment, how I can do this things? Thanks in advance.

How can you do what things?

Start a game in debug mode by pressing the small red arrow

Click on any of the small symbols in the debug window for pause, restart and stop the game. Use the menus to do other things.

Click Tools... Show Global Variables in the debug window to show a bunch of neat info.

Read page 112 in the user manual for more information.

Basically, when you assign variables in your game (x=1; y=2; for example), you can watch the state of those variables in debug mode.

If you still don't understand what I am saying, it's time to start watching tutorials about GML and coding. You can use debug mode if you have a drag and drop game, but your understanding of it will be much broader after you have done some coding.

Hope this helps!

Edited by integrate, 23 April 2012 - 05:00 PM.

  • 0

#5 kupo15

kupo15

    GMC Member

  • GMC Member
  • 400 posts

Posted 23 April 2012 - 05:01 PM

press the plus sign. If you have something that isn't working that involves an array list you for example you can press the plus sign and type
object.array[0] and view array 0. If you expect something to happen when a variable = a number but its not happening, you can press the + sign, type in the variable name (you need to specify which object has it) and watch the variable. You will soon find out if that variable does = the number its supposed to or not which will tell you that the problem lies elsewhere.

The debug mode doesn't problem solve the game for you. It shows you what your code is ACTUALLY doing instead of what you THINK your code is doing
  • 0

#6 RacerBG

RacerBG

    GMC Member

  • GMC Member
  • 193 posts
  • Version:GM8

Posted 23 April 2012 - 05:21 PM

But the problem is that I see just ordinary game window, no additional tools on it.....
  • 0

#7 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 05:36 PM

But the problem is that I see just ordinary game window, no additional tools on it.....


Ah yes, that is the one detail we didn't know ;)
That would certainly make a difference!

You don't see this window when you run debug mode?
Posted Image

It is a separate window from the game window, make sure you're not missing it. It typically appears at the top-left of your screen.
  • 1

#8 RacerBG

RacerBG

    GMC Member

  • GMC Member
  • 193 posts
  • Version:GM8

Posted 23 April 2012 - 05:41 PM

Finally! Thanks man, thanks for that. This I was not seeing when I was running my game and that part was totally invisible for me.

Thank you +rep.Posted Image
  • 0

#9 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 05:43 PM

Finally! Thanks man, thanks for that. This I was not seeing when I was running my game and that part was totally invisible for me.

Thank you +rep.Posted Image

You're welcome! I bet our instructions make sense now. :D
  • 0

#10 RacerBG

RacerBG

    GMC Member

  • GMC Member
  • 193 posts
  • Version:GM8

Posted 23 April 2012 - 05:52 PM


Finally! Thanks man, thanks for that. This I was not seeing when I was running my game and that part was totally invisible for me.

Thank you +rep.Posted Image

You're welcome! I bet our instructions make sense now. :D


Yes now they're. At coding Im beggineer but this is not a problem. I love to create things and this debug mode will be actually a doctor for my wounded projects and I will be their repair man.Posted Image
  • 0

#11 kupo15

kupo15

    GMC Member

  • GMC Member
  • 400 posts

Posted 23 April 2012 - 07:16 PM

Now if only we had more than one debug window. That would be wonderful :/
  • 0

#12 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 08:09 PM

Now if only we had more than one debug window. That would be wonderful :/

: )

It's rare that I use debug anymore. I created a debug object and now Draw all my variables on screen when I press D. Much easier for me.
  • 0

#13 kupo15

kupo15

    GMC Member

  • GMC Member
  • 400 posts

Posted 23 April 2012 - 09:11 PM

ah, might be worth looking into for me. However that still wouldn't solve the problem when I need to look at an array of 80 all fitting on the screen :)
  • 0

#14 integrate

integrate

    GMC Member

  • GMC Member
  • 255 posts
  • Version:GM8

Posted 23 April 2012 - 10:11 PM

ah, might be worth looking into for me. However that still wouldn't solve the problem when I need to look at an array of 80 all fitting on the screen :)

Yeah, good luck with that! :D
Oh well, as we can see, there are many options.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users