lemmy101 Posted August 23, 2013 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
RoboMat Posted August 23, 2013 Posted August 23, 2013 Works like a charm so far It's 4:22 AM ... I will sleep now.
dida55 Posted August 23, 2013 Posted August 23, 2013 does all the versions have this debuger?Just .16
speider Posted August 23, 2013 Posted August 23, 2013 does all the versions have this debuger?Just .16 guess i have to dowload it then i must have this!
RegularX Posted August 23, 2013 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?
johndough Posted August 23, 2013 Posted August 23, 2013 Looks great, but with 1000 lines of code we need scrollbars
johndough Posted August 23, 2013 Posted August 23, 2013 I just realized you could use the mouse wheel, though.
speider Posted August 24, 2013 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
RegularX Posted August 24, 2013 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
RoboMat Posted August 24, 2013 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?
speider Posted August 24, 2013 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.
speider Posted August 24, 2013 Posted August 24, 2013 Hold left shift when you boot the game wow thx it works now^^
RoboMat Posted August 26, 2013 Posted August 26, 2013 Is there a way to set breakpoints in your code "before" going into the actual game?
lemmy101 Posted August 26, 2013 Author Posted August 26, 2013 call the function breakpoint() in lua this will always break every time it runs. RoboMat 1
blindcoder Posted August 29, 2013 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?
RoboMat Posted August 29, 2013 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?
blindcoder Posted August 29, 2013 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...
lemmy101 Posted August 29, 2013 Author 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.
Stormy Posted August 29, 2013 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.
blindcoder Posted August 29, 2013 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
Aricane Posted August 29, 2013 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################################################################################ harakka, RoboMat and blindcoder 3
blindcoder Posted August 30, 2013 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!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now