• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Mac OSX GMS2 OSX show_debug_message

tagwolf

Member
Did I miss something? show_debug_message isn't working for me on the mac client.

obj_test - Create event
Code:
show_debug_message("I like cheese.");
Object placed in room.

Code:
Compile Constants...finished.
Remove DnD...finished.
Compile Scripts...finished.
Compile Objects...finished.
Compile Timelines...finished.
Compile Triggers...finished.
Compile Rooms...finished.
Compile Extensions...finished.
Global scripts...finished.
Final Compile...finished.
Saving IFF file... /var/folders/cl/9dskxv1544db7w_c7l27l44c0000gn/GameMakerStudio2/GMS2TEMP/debug_test_452199A5_VM/debug_test.zip
Writing Chunk... GEN8
option_game_speed=30
Writing Chunk... OPTN
Writing Chunk... LANG
Writing Chunk... EXTN
Writing Chunk... SOND
Writing Chunk... AGRP
Writing Chunk... SPRT
Writing Chunk... BGND
Writing Chunk... PATH
Writing Chunk... SCPT
Writing Chunk... GLOB
Writing Chunk... SHDR
Writing Chunk... FONT
Writing Chunk... TMLN
Writing Chunk... OBJT
Writing Chunk... ROOM
Writing Chunk... DAFL
Writing Chunk... EMBI
Writing Chunk... TPAGE
Writing Chunk... CODE
Writing Chunk... VARI
Writing Chunk... FUNC
Writing Chunk... STRG
Writing Chunk... TXTR
Writing Chunk... AUDO
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... INST
Writing Chunk... LOCL
Writing Chunk... STRG
Writing Chunk... SCPT
Writing Chunk... DBGI
Writing Chunk... INST
Writing Chunk... LOCL
Writing Chunk... STRG
Stats : GMA : Elapsed=597.536
Stats : GMA : sp=0,au=0,bk=0,pt=0,sc=0,sh=0,fo=0,tl=0,ob=1,ro=1,da=0,ex=0,ma=3,fm=0x40000


/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono DONE (0)
nname: /var/folders/cl/9dskxv1544db7w_c7l27l44c0000gn/GameMakerStudio2/GMS2TEMP/debug_test_452199A5_VM/debug_test.zip
destname: /var/folders/cl/9dskxv1544db7w_c7l27l44c0000gn/GameMakerStudio2/GMS2TEMP/debug_test_452199A5_VM/GameAssetsMac.zip
IsMacConnected
InstallRunnerOnMac
RunOnMac
/bin/bash -c "cd ~ && mkdir -p /Users/User/GameMakerStudio2/Mac"


/bin/bash DONE (0)
open -a "/Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.0.7.110/mac/YoYo Runner.app" --args -game "/var/folders/cl/9dskxv1544db7w_c7l27l44c0000gn/GameMakerStudio2/GMS2TEMP/debug_test_452199A5_VM/GameAssetsMac.zip"


open DONE (0)
Started on Mac
Successfully extracted game.yydebug
Igor complete.
elapsed time 00:00:02.9189950s for command "/Library/Frameworks/Mono.framework/Versions/Current/Commands/mono" /Users/Shared/GameMakerStudio2/Cache/runtimes/runtime-2.0.7.110/bin/Igor.exe -options="/var/folders/cl/9dskxv1544db7w_c7l27l44c0000gn/GameMakerStudio2/GMS2TEMP/build.bff"  -- Mac Run started at 08/04/2017 13:11:44
SUCCESS: Run Program Complete
 

tagwolf

Member
Blarg.. back to a windows VM for now then it seems. I use debug messages constantly during development. :(
 
Here's the current list of known issues for Mac Beta, it includes the show_debug_message() among other things.

https://help.yoyogames.com/hc/en-us/articles/115000470872

As a workaround for this, I made a function called "log()" that writes my debug messages to a file which I can then check.

Code:
///log(string)

var message = argument0

global.log_file = file_text_open_append("debug.log")
file_text_write_string(global.log_file, message)
file_text_writeln(global.log_file)
file_text_close(global.log_file)
Plus its a lot easier to just write "log" instead of show_debug_message all the time.

And when show_debug_message is working again, I only need to change this function, I won't need to replace all the log calls in my game.
 
@yoyoSleepzero In the latest build 2.1.0.207 the release notes say:

upload_2017-8-28_8-40-49.png

If you run the game in debug mode, there is a new graph window:
upload_2017-8-28_8-58-0.png

If you hover the mouse over the diamond shapes at the top, you can see what debug messages were printed, and open them in another window if desired.
 
M

McGlu

Guest
Consolation I guess, but I really miss having this in the output window. Thanks for pointing it out!
 
I liked having it in the output window too. It would appear there whether I am using debug mode or not. (If I'm remembering correctly - its been a while since I used GMS 1.4)

But this new way looks promising, going to try it our for a while before passing judgement, just need some time to get used to it probably.
 

rwkay

GameMaker Staff
GameMaker Dev.
It should be appearing in the Output Window so this is a bug as well - we shall look at that

Russell
 
B

baconandgames

Guest
As a workaround for this, I made a function called "log()" that writes my debug messages to a file which I can then check.
I love this idea, but I'm very new to GameMaker. This looks like a global function that could be executed from anywhere. Where would I put code like this in GameMaker such that it would be accessible from anywhere and not have to drag and drop it into every room for it to be accessible? I appreciate the info.
 
This looks like a global function that could be executed from anywhere.
It is, and it can.

In fact, this is generally true of all scripts in GMS. Not that you necessarily should execute them from just anywhere, but you can.

Where would I put code like this in GameMaker such that it would be accessible from anywhere and not have to drag and drop it into every room for it to be accessible?
Create a new script, give it a suitable name, preferably short as its something that might be heavily used.

I chose log() - as long as GMS doesn't add a maths log function with the same name it will be fine.

If that happens, could always make it something like mlog (message log) etc...

And that's typically all you need to do, you can then call log("my message") from anywhere
 
B

baconandgames

Guest
Well that's easy! I was expecting that I'd have to register the script as Global or put it somewhere in the IDE to mark it as Global. But it sounds like by default all scripts are globally accessible. Thanks for the info, much appreciated.
 
Top