lemmy101 Posted August 23, 2013 Share Posted August 23, 2013 (edited) Just a few bullet points for now, will expand on it later: Will fill this out as I go, we're uploading an SI test release btw Must be in debug mode (either hold left shift while booting the game, or for more permanently run game with -debug / -Ddebug params (depends, try both))* - alternatively try holding left shift while booting the game.There is an edit box above the filename browser that you can use to search for files containing case insensitive strings F11 breaks into the debugger at the next available Lua entry point. Key is bindable.F5 steps into code, F6 steps over code.Left double click lua line to place / remove breakpoint.Local variables panel is something that required a lot of guesswork and fiddling this end, and was by far the most complicated thing, and there may be times where it doesn't show something it should. Will get to all these in time.Still some issues with java objects in object viewer etcJust occured to me I didn't update the main dev branch with the new map debugging stuff (showing characters / collision, will get that in another release)Right click object viewer for menu to put a breakpoint on the data on read / write, or to add to the watch window.Left double click stuff to open info in a window is the general rule for object viewers, stacks etc.Line numbers may occasionally be a line off in errors / stack. Will look to improve this if possible, but its tricky. Even ProDG the official Sony Playstation debugger suffered this problem the entire time I used it.If UI breakpoints aren't enough, call the function breakpoint() in lua this will always break every time it runs. Expect bugs and slightly unfinished things. It's all very experimental, but is already MASSIVELY useful for any lua modder, so get used to using it if you do lua and you're not using it, then you are MAD. *Mac Users need to follow these steps to use the debugger:Open your PZ.app and look for a file called "Info.plist" then search for this line: <string>-noverify -XX:+UseNUMA -XX:+AggressiveOpts -XX:+TieredCompilation -XX:Tier2CompileThreshold=70000 -XX:CompileThreshold=1500 -Xms64m -Xmx512m -XX:+UseAdaptiveSizePolicy -XX:GCTimeRatio=50 -XX:MaxGCPauseMillis=20</string>add "-Ddebug" to it (of course before the last </string> tag). Edited September 24, 2013 by RoboMat Added mac instructions SonaGX 1 Quote Link to comment Share on other sites More sharing options...
RoboMat Posted August 23, 2013 Share Posted August 23, 2013 Works like a charm so far It's 4:22 AM ... I will sleep now. Quote Link to comment Share on other sites More sharing options...
speider Posted August 23, 2013 Share Posted August 23, 2013 does all the versions have this debuger? Quote Link to comment Share on other sites More sharing options...
dida55 Posted August 23, 2013 Share Posted August 23, 2013 does all the versions have this debuger?Just .16 Quote Link to comment Share on other sites More sharing options...
speider Posted August 23, 2013 Share Posted August 23, 2013 does all the versions have this debuger?Just .16 guess i have to dowload it then i must have this! Quote Link to comment Share on other sites More sharing options...
RegularX Posted August 23, 2013 Share Posted August 23, 2013 Looks completely brilliant, will take it for a proper spin this weekend. Is there a Lua available method to toggle the command line on and off? I only saw the binding for the full debugger? Quote Link to comment Share on other sites More sharing options...
johndough Posted August 23, 2013 Share Posted August 23, 2013 Looks great, but with 1000 lines of code we need scrollbars Quote Link to comment Share on other sites More sharing options...
johndough Posted August 23, 2013 Share Posted August 23, 2013 I just realized you could use the mouse wheel, though. Quote Link to comment Share on other sites More sharing options...
speider Posted August 24, 2013 Share Posted August 24, 2013 i have .16 now can't get debuger to work and my char can't drink water from the sink in the kitchen Quote Link to comment Share on other sites More sharing options...
RegularX Posted August 24, 2013 Share Posted August 24, 2013 Sweet mother in the morning, when I do something wrong it just .... it ... just .... SHOWS ME THE *&%?! LINE? This. Is. Beautiful. And seriously, if it happens to be accidentally showing me the line above or below it? I think I can forgive. lemmy101 1 Quote Link to comment Share on other sites More sharing options...
RoboMat Posted August 24, 2013 Share Posted August 24, 2013 i have .16 now can't get debuger to work and my char can't drink water from the sink in the kitchenDid you add the -debug flag? Quote Link to comment Share on other sites More sharing options...
speider Posted August 24, 2013 Share Posted August 24, 2013 i have .16 now can't get debuger to work and my char can't drink water from the sink in the kitchenDid you add the -debug flag? don't think so where do i do that?, im on windows btw. Quote Link to comment Share on other sites More sharing options...
lemmy101 Posted August 24, 2013 Author Share Posted August 24, 2013 Hold left shift when you boot the game Quote Link to comment Share on other sites More sharing options...
speider Posted August 24, 2013 Share Posted August 24, 2013 Hold left shift when you boot the game wow thx it works now^^ Quote Link to comment Share on other sites More sharing options...
RoboMat Posted August 26, 2013 Share Posted August 26, 2013 Is there a way to set breakpoints in your code "before" going into the actual game? Quote Link to comment Share on other sites More sharing options...
lemmy101 Posted August 26, 2013 Author Share Posted August 26, 2013 call the function breakpoint() in lua this will always break every time it runs. RoboMat 1 Quote Link to comment Share on other sites More sharing options...
RoboMat Posted August 26, 2013 Share Posted August 26, 2013 Awesome! Thanks lemmy! Quote Link to comment Share on other sites More sharing options...
blindcoder Posted August 29, 2013 Share Posted August 29, 2013 I'm trying to get the debugger to work, but no luck. I've tried ./projectzomboid.sh -Ddebug -debug while holding left shift, but pressing F11 in a game does... nothing? Quote Link to comment Share on other sites More sharing options...
RoboMat Posted August 29, 2013 Share Posted August 29, 2013 I'm trying to get the debugger to work, but no luck. I've tried ./projectzomboid.sh -Ddebug -debug while holding left shift, but pressing F11 in a game does... nothing? For me it only comes up, when I have set a breakpoint or if it encounters a bug ... maybe try that? Quote Link to comment Share on other sites More sharing options...
blindcoder Posted August 29, 2013 Share Posted August 29, 2013 I'm trying to get the debugger to work, but no luck. I've tried ./projectzomboid.sh -Ddebug -debug while holding left shift, but pressing F11 in a game does... nothing? For me it only comes up, when I have set a breakpoint or if it encounters a bug ... maybe try that? Tried it, no debug stuff Got an error message in the logfile though. Just want to know if I can call the screenshot function from lua... Quote Link to comment Share on other sites More sharing options...
lemmy101 Posted August 29, 2013 Author Share Posted August 29, 2013 I'm trying to get the debugger to work, but no luck. I've tried ./projectzomboid.sh -Ddebug -debug while holding left shift, but pressing F11 in a game does... nothing? For me it only comes up, when I have set a breakpoint or if it encounters a bug ... maybe try that? Tried it, no debug stuff Got an error message in the logfile though. Just want to know if I can call the screenshot function from lua... Do you get a console window in-game when u start? If not, then you are not in debug mode. Quote Link to comment Share on other sites More sharing options...
Stormy Posted August 29, 2013 Share Posted August 29, 2013 Do you get a console window in-game when u start? If not, then you are not in debug mode. This is the problem I get. Shift was doing nothing for me, neither was -debug or -Ddebug I'm guessing the arguments aren't case sensitive. Wouldn't explain why shift wasn't being picked up on thought. Quote Link to comment Share on other sites More sharing options...
blindcoder Posted August 29, 2013 Share Posted August 29, 2013 Do you get a console window in-game when u start? If not, then you are not in debug mode. No, I do not Quote Link to comment Share on other sites More sharing options...
Aricane Posted August 29, 2013 Share Posted August 29, 2013 To fix it on Linux, open projectzomboid.sh and put in-Ddebug \like this#!/bin/bash## projectzomboid.sh################################################################################SCRIPT="`basename $0`"GAMEDIR="${HOME}/.project_zomboid_2.9.9.17"LOGFILE="${GAMEDIR}/${SCRIPT}.log"INSTDIR="`dirname $0`" ; cd "${INSTDIR}" ; INSTDIR="`pwd`"[[ ! -d "${GAMEDIR}" ]] && mkdir -m 0755 "${GAMEDIR}"JARPATH=".:lwjgl.jar:lwjgl_util.jar:jinput.jar"# XMODIFIERS is cleared here to prevent SCIM screwing up keyboard inputXMODIFIERS= java \ -Djava.library.path="${INSTDIR}" \ -Dorg.lwjgl.util.NoChecks=true \ -Dorg.lwjgl.librarypath="${INSTDIR}" \ -Ddebug \ -Xms768m \ -Xmx768m \ -XX:-UseSplitVerifier \ -cp "${JARPATH}" \ zombie.core.LaunchDialog \ "$@" \ >"${LOGFILE}"exit 0## EOF################################################################################ RoboMat, harakka and blindcoder 3 Quote Link to comment Share on other sites More sharing options...
blindcoder Posted August 30, 2013 Share Posted August 30, 2013 To fix it on Linux, open projectzomboid.sh and put in-Ddebug \ That did it! So "$@" is at the wrong place in the script. Should be "${@}" anyway Thanks! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.