[{"data":1,"prerenderedAt":325},["ShallowReactive",2],{"doc-global_essentials\u002Fadvanced\u002Fdebugging":3},{"id":4,"title":5,"body":6,"description":16,"extension":316,"meta":317,"navigation":320,"path":321,"seo":322,"stem":323,"__hash__":324},"docs\u002Fdocs\u002Fglobal_essentials\u002Fadvanced\u002Fdebugging.md","Debugging",{"type":7,"value":8,"toc":305},"minimark",[9,13,17,20,25,28,34,46,49,54,57,135,138,140,144,147,154,158,196,200,203,206,225,228,239,241,245,252,281,283,287,301],[10,11,5],"h1",{"id":12},"debugging",[14,15,16],"p",{},"Dryad Engine provides two main debugging tools: the native browser console and the built-in Debug Panel.",[18,19],"hr",{},[21,22,24],"h2",{"id":23},"browser-console","Browser Console",[14,26,27],{},"Since Dryad Engine is web-based and runs in Electron, all standard web development practices apply. You can use the browser's developer tools to debug your game.",[14,29,30],{},[31,32,33],"strong",{},"Opening the console:",[35,36,37],"ul",{},[38,39,40,41,45],"li",{},"File → Toggle Developer Tools ( ",[42,43,44],"code",{},"Ctrl+Shift+I"," )",[14,47,48],{},"The console shows errors, warnings, and log messages from both the engine and your scripts.",[50,51,53],"h3",{"id":52},"engine-logger","Engine Logger",[14,55,56],{},"The engine uses a structured logging system with colored output and importance levels:",[58,59,60,76],"table",{},[61,62,63],"thead",{},[64,65,66,70,73],"tr",{},[67,68,69],"th",{},"Level",[67,71,72],{},"Color",[67,74,75],{},"Use",[77,78,79,91,102,113,124],"tbody",{},[64,80,81,85,88],{},[82,83,84],"td",{},"INFO",[82,86,87],{},"Blue",[82,89,90],{},"General messages",[64,92,93,96,99],{},[82,94,95],{},"SUCCESS",[82,97,98],{},"Green",[82,100,101],{},"Successful operations",[64,103,104,107,110],{},[82,105,106],{},"OVERWRITE",[82,108,109],{},"Brown",[82,111,112],{},"Data overwrites(e.g you want to overwrite an action's default behavior)",[64,114,115,118,121],{},[82,116,117],{},"WARN",[82,119,120],{},"Yellow",[82,122,123],{},"Warnings",[64,125,126,129,132],{},[82,127,128],{},"ERROR",[82,130,131],{},"Red",[82,133,134],{},"Errors",[14,136,137],{},"When dev mode is enabled, log messages also show the source file and line number, making it easy to trace where code was called from.",[18,139],{},[21,141,143],{"id":142},"debug-panel","Debug Panel",[14,145,146],{},"The Debug Panel is visible automatically when playtesting your game from the Engine Editor. It provides a visual interface to inspect and manipulate game state without writing code.",[14,148,149],{},[150,151],"img",{"alt":152,"src":153},"debug_panel","\u002Fplay\u002Fassets\u002Fengine_files\u002Fplugins\u002Fglobal_essentials\u002Fdocs\u002Fen\u002Fimages\u002Fdebug_panel.png",[50,155,157],{"id":156},"what-you-can-inspect","What You Can Inspect",[35,159,160,166,172,178,184,190],{},[38,161,162,165],{},[31,163,164],{},"Characters"," - View and modify character stats, resources, traits, and statuses",[38,167,168,171],{},[31,169,170],{},"Inventories"," - Browse items, add\u002Fremove items, check equipment",[38,173,174,177],{},[31,175,176],{},"Dungeons"," - See current dungeon, room, and scene data",[38,179,180,183],{},[31,181,182],{},"Flags"," - View and modify game flags",[38,185,186,189],{},[31,187,188],{},"States"," - Check current UI and game states",[38,191,192,195],{},[31,193,194],{},"Registry"," - See all registered events, actions, conditions, placeholders, stat computers, and components",[50,197,199],{"id":198},"custom-debug-buttons","Custom Debug Buttons",[14,201,202],{},"You can add custom debug buttons that appear in the Debug Panel. These are useful for testing specific scenarios like giving items, teleporting, or triggering events.",[14,204,205],{},"Add custom debug buttons in the Engine Editor:",[207,208,209,215,222],"ol",{},[38,210,211,212],{},"Go to ",[31,213,214],{},"General → Custom Choices",[38,216,217,218,221],{},"Create choices with the ",[42,219,220],{},"debug"," group",[38,223,224],{},"These appear as buttons in the Debug Panel during playtest",[14,226,227],{},"Example uses:",[35,229,230,233,236],{},[38,231,232],{},"\"Give 1000 Gold\" - quickly test shop purchases",[38,234,235],{},"\"Max All Stats\" - test endgame content",[38,237,238],{},"\"Trigger Boss Fight\" - skip to specific encounters",[18,240],{},[21,242,244],{"id":243},"checking-dev-mode-in-scripts","Checking Dev Mode in Scripts",[14,246,247,248,251],{},"You can check if dev mode is enabled using ",[42,249,250],{},"game.isDevMode()",":",[253,254,259],"pre",{"className":255,"code":256,"language":257,"meta":258,"style":258},"language-javascript shiki shiki-themes github-light github-dark","if (game.isDevMode()) {\n  console.log('Debug info:', someData);\n}\n","javascript","",[42,260,261,269,275],{"__ignoreMap":258},[262,263,266],"span",{"class":264,"line":265},"line",1,[262,267,268],{},"if (game.isDevMode()) {\n",[262,270,272],{"class":264,"line":271},2,[262,273,274],{},"  console.log('Debug info:', someData);\n",[262,276,278],{"class":264,"line":277},3,[262,279,280],{},"}\n",[18,282],{},[21,284,286],{"id":285},"tips","Tips",[35,288,289,292,295,298],{},[38,290,291],{},"Keep the console open during development to catch errors early",[38,293,294],{},"Use the Debug Panel's Registry tab to verify your custom registrations are working",[38,296,297],{},"Create debug buttons for common testing scenarios to speed up iteration",[38,299,300],{},"Check the Network tab in Developer Tools if assets aren't loading",[302,303,304],"style",{},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":258,"searchDepth":271,"depth":271,"links":306},[307,310,314,315],{"id":23,"depth":271,"text":24,"children":308},[309],{"id":52,"depth":277,"text":53},{"id":142,"depth":271,"text":143,"children":311},[312,313],{"id":156,"depth":277,"text":157},{"id":198,"depth":277,"text":199},{"id":243,"depth":271,"text":244},{"id":285,"depth":271,"text":286},"md",{"plugin":318,"category":319,"page":12},"global_essentials","advanced",true,"\u002Fdocs\u002Fglobal_essentials\u002Fadvanced\u002Fdebugging",{"title":5,"description":16},"docs\u002Fglobal_essentials\u002Fadvanced\u002Fdebugging","4IV4NRaNq5-_dsQkIAgWJdd4giNbxpzcjm2IHoBoGt4",1779582261923]