Skip to content

godot 4 develop addon. high-level debug window for game status.

License

Notifications You must be signed in to change notification settings

folt-a/godot-live-debugger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

33 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Live Debugger

ๆ—ฅๆœฌ่ชžREADMEใฏใ“ใกใ‚‰ japanese readme is here

ํ•œ๊ตญ์–ด README korean readme is here

Live Debugger is Godot 4 addon.

A high-level window for debugging game status.

You can monitor and edit the properties of nodes you want to display.

It updates in real-time when you run the game window, so you can edit it.

You can check node status such as game progress without interfering with game debug play.

image

output.mp4

Installation and Usage

  1. Download or clone the repository to your local PC.

  2. Move/copy it to your Godot project so that it becomes addons/godot-live-debugger.

  3. In Godot, go to "Project Settings" โ†’ "Plugins" and check โœ… godot-live-debugger.

  4. The LiveDebugger scene is automatically registered in "AutoLoad".

  5. Set up the script of the node you want to monitor as shown below.

  6. Launch the game.

# Property directly below #@Debug will be monitored

#@Debug
var property_1:int = 300

#---

# function too.
# Note that _process is called every frame.

#@Debug
func get_str():
	return "abc"

#---

# alias name surrounded ''

#@Debug'alias_name'
var property_2:String = ""

#@Debugใ€Œๅˆฅๅใ€

#---

# assign categories. Tree items can be collapsed. Tree Node.

#@Debug(category_name)
var property_3:Vector2 = Vector2.ZERO

#---

# Categories can be made into subcategories with /.

#@Debug(cate1/nested_category2)
var property_4:Vector3 = Vector3.ZERO

#---

# specify properties by property name

#@Debug[position]

#---

# another node's properyy by property name.
# However, it can only be monitored and cannot be edited.

#@Debug[./ChildNode:position]

# Internally, get_node() is used up to the : character, 
# so % can also be used.

#@Debug[%ChildNode:position]

#---

# You can assign colors for better readability using {}.

#@Debug{#RED}
var property_5:StringName = &""

#@Debug{#f0f0f0}
var property_6:bool = false

#---


# Multiple settings

#@Debug(cate)'alias'{#RED}
var property_7:int = 123

#@Debug{#f0f0f0}
var property_8:bool = false

#---

# function with #@Call instead of #@Debug, a button will appear.
# when pressed, execute that function. It will not be monitored.
# The result of the function return is displayed in the value.
# You can also execute it by edit string as argument 1.

#@Call
func play() -> String:
	animation_player.play()
	return anim_name

#@Call
func play_animation(anim_name:StringName) -> String:
	animation_player.play(anim_name)
	return anim_name
# Write this somewhere in your script:
# Display only Node the specified nodename
#@DebugNode(NodeName1)

Project Settings

Debug Window

  • always_on_top

Always display the debugger window on top

  • Always on top
  • Show when main window focused
  • None
  • debugger_window_position_type
  • Adjacent to game on the right
  • Adjacent to game on the left
  • Adjacent to screen on the right
  • Adjacent to screen on the left
  • Absolute position
  • is_debugger_window_height_adjust_monitor_height

Whether to adjust the height of the debugger window to the monitor height

The window height will extend to the full monitor height.

Ignores the Y value of debugger_window_size.

If you lower the position by offsetting the Y value of debugger_window_position_offset, it will become smaller by that amount.

Ignored when using absolute position.

  • debugger_window_position_offset

Offset of the debugger window position (shift position) Shifts the window position.

Ignored when using absolute position.

*debugger_window_absolute_position

Absolute position of the debugger window Only valid when using absolute position.

In the case of multi-monitors, all monitor positions will affect it, so it tends to extend off the screen. Be careful.

  • debugger_window_size

Size of the debugger window The Y value is ignored if is_debugger_window_height_adjust_monitor_height is on.

Debugger Settings

  • frame_interval

Frame value for how often to check nodes.

If performance drops, increase this value.

Default:1, so every frame.

  • is_auto_focus_pause

Automatically pauses the game's SceneTree when the debugger window is focused

  • display_float_decimal

Limit on the number of decimal places displayed for floats.

It's only for display, so if you input more digits and reflect it, it will be properly reflected.

The display digits are limited.

Default:2 digits.

1.123456 โ†’ Displayed as 1.12

  • is_output_console_log

Whether this addon outputs logs to the console

If off, this addon will not print.

Logs will appear every time it checks all scripts to find targets when updating external data.

  • ignore_script_paths

Script paths to ignore

  • is_add_debugger_to_autoload_singleton

Whether to add the Live Debugger node to "AutoLoad" (Autoload singleton)

If on, it will be registered. If off, it will be unregistered.

You can also add or remove it from the project's "AutoLoad".

This addon will check all nodes regardless of where it is placed.

If you want to check only specific scenes, you can also add the LiveDebugger.tscn scene as a node in the tree.

  • is_update_when_save_external_data

Whether to automatically update when saving external data

When external data is updated, it checks all scripts to find targets.

It is called every time something is updated, so turn it off if it becomes low performance.

In that case, execute "Project" โ†’ "Tools" โ†’ "Update LiveDebugger Data" instead.

Contributing

Contributions are welcome!

If you have any suggestions, bug reports, or improvements, feel free to submit a pull request or open an issue on the repository.

License

MIT License.

Donate

If this addon helped you develop your game project, please donate.


jpreadme

Live Debugger ๆ—ฅๆœฌ่ชžREADME ๏ผˆJapanese translation README๏ผ‰

ใ‚ฒใƒผใƒ ใ‚นใƒ†ใƒผใ‚ฟใ‚นใฎใƒ‡ใƒใƒƒใ‚ฐใฎใŸใ‚ใฎ้ซ˜ใƒฌใƒ™ใƒซใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใงใ™ใ€‚

่กจ็คบใ—ใŸใ„ใƒŽใƒผใƒ‰ใฎใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใ‚’็›ฃ่ฆ–ใ—ใŸใ‚Šใ€ๅ€คใ‚’็ทจ้›†ใ—ใŸใ‚Šใงใใพใ™ใ€‚

ใ‚ฒใƒผใƒ  ใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใ‚’ๅฎŸ่กŒใ™ใ‚‹ใจใƒชใ‚ขใƒซใ‚ฟใ‚คใƒ ใงๆ›ดๆ–ฐใ•ใ‚Œใ‚‹ใฎใงใ€็ทจ้›†ใงใใพใ™ใ€‚

ๆ“ไฝœใ‚’ๅฆจใ’ใšใซใ‚ฒใƒผใƒ ้€ฒ่กŒใชใฉใฎๅค‰ๆ•ฐใ‚’็ขบ่ชใงใใพใ™ใ€‚

image

output.mp4

ใ‚คใƒณใ‚นใƒˆใƒผใƒซใ€ไฝฟใ„ๆ–น

  1. downloadใ‹Gitใฎcloneใ‚’ใ—ใฆใƒญใƒผใ‚ซใƒซPCใซๅ…ฅใ‚Œใพใ™ใ€‚

  2. addons/godot-live-debugger ใจใชใ‚‹ใ‚ˆใ†ใซใ‚ใชใŸใฎGodotใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใซ็งปๅ‹•/ใ‚ณใƒ”ใƒผใ—ใพใ™ใ€‚

  3. Godot ใ€Œใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆ่จญๅฎšใ€โ†’ใ€Œใƒ—ใƒฉใ‚ฐใ‚คใƒณใ€ใงgodot-live-debuggerใ‚’โœ…ใ—ใพใ™ใ€‚

  4. ่‡ชๅ‹•็š„ใซใ€Œ่‡ชๅ‹•่ชญใฟ่พผใฟใ€ใซ LiveDebugger ใ‚ทใƒผใƒณใŒ็™ป้Œฒใ•ใ‚Œใฆใ„ใพใ™ใ€‚

  5. โ†“ใฎใ‚ˆใ†ใซ็›ฃ่ฆ–ใ—ใŸใ„ใƒŽใƒผใƒ‰ใฎใ‚นใ‚ฏใƒชใƒ—ใƒˆใซ่จญๅฎšใ‚’ใ—ใพใ™ใ€‚

  6. ใ‚ฒใƒผใƒ ใ‚’่ตทๅ‹•ใ—ใพใ™ใ€‚

ใ‚นใ‚ฏใƒชใƒ—ใƒˆใธใฎ่จญๅฎš

# ็‰นๅฎšใฎใ‚ณใƒกใƒณใƒˆ #@Debug ใฎ็›ดไธ‹ใฎใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใ‚’็›ฃ่ฆ–ๅฏพ่ฑกใซใ—ใพใ™

#@Debug
var property_1:int = 300

#---

# ้–ขๆ•ฐใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚_processใงๆฏŽใƒ•ใƒฌใƒผใƒ ๅ‘ผใณๅ‡บใ•ใ‚Œใ‚‹ใฎใงๆณจๆ„ใ€‚

#@Debug
func get_str():
	return "abc"

#---

# ใ€Œใ€ใ‹''ใง่ฆ‹ใ‚„ใ™ใ„ใ‚ˆใ†ใซ่กจ็คบใฎใŸใ‚ใฎๅๅ‰ใ‚’ใคใ‘ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚

#@Debug'alias_name'
var property_2:String = ""

#@Debugใ€Œๅˆฅๅใ€

#---

# ใ‚ซใƒ†ใ‚ดใƒชใ‚’ใคใ‘ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚ใƒ„ใƒชใƒผใ‚ขใ‚คใƒ†ใƒ ใฎๆŠ˜ใ‚ŠใŸใŸใฟใŒใงใใพใ™ใ€‚

#@Debug(category_name)
var property_3:Vector2 = Vector2.ZERO

#---

# ใ‚ซใƒ†ใ‚ดใƒชใฏใ‚นใƒฉใƒƒใ‚ทใƒฅ/ใงใ‚ตใƒ–ใ‚ซใƒ†ใ‚ดใƒชใซใงใใพใ™ใ€‚ๆŠ˜ใ‚ŠใŸใŸใฟใ€‚

#@Debug(cate1/nested_category2)
var property_4:Vector3 = Vector3.ZERO

#---

# ใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃๅๆŒ‡ๅฎšใงใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™

#@Debug[position]

#---

# ใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃๅๆŒ‡ๅฎšใงๅˆฅใฎใƒŽใƒผใƒ‰ใฎใƒ—ใƒญใƒ‘ใƒ†ใ‚ฃใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚ใŸใ ใ—็›ฃ่ฆ–ใฎใฟใง็ทจ้›†ไธๅฏ่ƒฝใงใ™ใ€‚

#@Debug[./ChildNode:position]

# ๅ†…้ƒจๅ‡ฆ็†ใงใฏ:ใฎๅ‰ใพใงใ‚’get_node()ใ—ใฆใ„ใ‚‹ใฎใง%ใ‚‚ไฝฟ็”จใงใใพใ™ใ€‚

#@Debug[%ChildNode:position]

#---

# {} ใง่ฆ‹ใ‚„ใ™ใ„ใ‚ˆใ†ใซ่‰ฒใ‚’ใ‚’ใคใ‘ใ‚‹ใ“ใจใŒใงใใพใ™ใ€‚

#@Debug{#RED}
var property_5:StringName = &""

#@Debug{#f0f0f0}
var property_6:bool = false

#---


# ่ค‡ๆ•ฐใฎๆŒ‡ๅฎšใ‚‚ใงใใพใ™ใ€‚้ †ไธๅŒใ€‚

#@Debug(cate)'alias'{#RED}
var property_7:int = 123

#@Debug{#f0f0f0}
var property_8:bool = false

#---

# #@Debugใงใฏใชใ #@Call ใง้–ขๆ•ฐใ‚’ๆŒ‡ๅฎšใ™ใ‚‹ใจใ€ใƒœใ‚ฟใƒณใŒ่กจ็คบใ•ใ‚Œใ€ๆŠผใ™ใจใใฎ้–ขๆ•ฐใ‚’ๅฎŸ่กŒใ—ใพใ™ใ€‚็›ฃ่ฆ–ๅฏพ่ฑกใซใฏใ—ใพใ›ใ‚“ใ€‚
# ้–ขๆ•ฐใฎreturnใฎ็ตๆžœใŒๅ€คใซ่กจ็คบใ•ใ‚Œใพใ™ใ€‚ใ€€ๅผ•ๆ•ฐ1ใ‚’ๅ€คใซๅ…ฅๅŠ›ใ—ใฆๅฎŸ่กŒใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚

#@Call
func play() -> String:
	animation_player.play()
	return anim_name

#@Call
func play_animation(anim_name:StringName) -> String:
	animation_player.play(anim_name)
	return anim_name

# ใ‚นใ‚ฏใƒชใƒ—ใƒˆใฎใฉใ“ใ‹ใซๆ›ธใ
# ใ“ใฎใƒŽใƒผใƒ‰ๅใจไธ€่‡ดใ™ใ‚‹ใƒŽใƒผใƒ‰ใฎใฟใ‚’็›ฃ่ฆ–ๅฏพ่ฑกใซใ—ใพใ™ใ€‚
#@DebugNode(NodeName1)

Project Settings ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใฎ่จญๅฎš

Debug Window ใƒ‡ใƒใƒƒใ‚ฐใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎ่จญๅฎš

  • always_on_top

ใƒ‡ใƒใƒƒใ‚ฌใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใงๅธธใซๆœ€ๅ‰้ขใซ่กจ็คบ

  • Always on top :ๅธธใซๆœ€ๅ‰้ขใซ่กจ็คบใ—ใพใ™ใ€‚
  • Show when main window focused :ใ‚ฒใƒผใƒ ใฎใƒกใ‚คใƒณใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใ‚’ใƒ•ใ‚ฉใƒผใ‚ซใ‚นใ—ใŸใจใใซๅ‰ใซใงใฆใใพใ™ใ€‚
  • None :ใ—ใพใ›ใ‚“ใ€‚
  • debugger_window_position_type

ใƒ‡ใƒใƒƒใ‚ฌใƒผใฎใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎไฝ็ฝฎใฎ็จฎๅˆฅ

  • ใ‚ฒใƒผใƒ ๅณ้šฃๆŽฅ
  • ใ‚ฒใƒผใƒ ๅทฆ้šฃๆŽฅ
  • ็”ป้ขๅณ้šฃๆŽฅ
  • ็”ป้ขๅทฆ้šฃๆŽฅ
  • ็ตถๅฏพไฝ็ฝฎๆŒ‡ๅฎš
  • is_debugger_window_height_adjust_monitor_height

ใƒ‡ใƒใƒƒใ‚ฌใƒผใฎใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎ้ซ˜ใ•ใ‚’ใƒขใƒ‹ใ‚ฟใƒผใฎ้ซ˜ใ•ใซๅˆใ‚ใ›ใ‚‹ใ‹

ใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎ้ซ˜ใ•ใŒใƒขใƒ‹ใ‚ฟใƒผใ„ใฃใฑใ„ใพใงไผธใณใพใ™ใ€‚ debugger_window_sizeใฎYใ‚’็„ก่ฆ–ใ—ใพใ™ใ€‚ debugger_window_position_offsetใฎYใ‚’ใšใ‚‰ใ—ใฆไฝ็ฝฎใ‚’ไธ‹ใ’ใ‚‹ใจใใฎใถใ‚“ๅฐใ•ใใชใ‚Šใพใ™

็ตถๅฏพไฝ็ฝฎๆŒ‡ๅฎšใฎๅ ดๅˆใฏ็„ก่ฆ–ใ•ใ‚Œใพใ™ใ€‚

  • debugger_window_position_offset

ใƒ‡ใƒใƒƒใ‚ฌใƒผใฎใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎไฝ็ฝฎใฎใ‚ชใƒ•ใ‚ปใƒƒใƒˆ๏ผˆไฝ็ฝฎใ‚’ใšใ‚‰ใ™๏ผ‰

ใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎไฝ็ฝฎใ‚’ใšใ‚‰ใ—ใพใ™ใ€‚

็ตถๅฏพไฝ็ฝฎๆŒ‡ๅฎšใฎๅ ดๅˆใฏ็„ก่ฆ–ใ•ใ‚Œใพใ™ใ€‚

  • debugger_window_absolute_position

ใƒ‡ใƒใƒƒใ‚ฌใƒผใฎใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎ็ตถๅฏพไฝ็ฝฎ

็ตถๅฏพไฝ็ฝฎๆŒ‡ๅฎšใฎๅ ดๅˆใฎใฟๆœ‰ๅŠนใงใ™ใ€‚

ใƒžใƒซใƒใƒขใƒ‹ใ‚ฟใƒผใฎๅ ดๅˆใฏใ™ในใฆใฎใƒขใƒ‹ใ‚ฟใƒผไฝ็ฝฎใŒๅฝฑ้Ÿฟใ™ใ‚‹ใฎใงใ€็”ป้ขๅค–ใซ้ฃ›ใณๅ‡บใ—ใŒใกใ€‚ๆณจๆ„ใ€‚

  • debugger_window_size

ใƒ‡ใƒใƒƒใ‚ฌใƒผใฎใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใฎใ‚ตใ‚คใ‚บ

is_debugger_window_height_adjust_monitor_heightใŒใ‚ชใƒณใฎๅ ดๅˆใฏYใฏ็„ก่ฆ–ใ•ใ‚Œใพใ™ใ€‚

ใƒ‡ใƒใƒƒใ‚ฌใƒผ่จญๅฎš

  • frame_interval

ไฝ•ใƒ•ใƒฌใƒผใƒ ใซไธ€ๅบฆใƒŽใƒผใƒ‰ใ‚’ใƒใ‚งใƒƒใ‚ฏใ™ใ‚‹ใ‹ใฎใƒ•ใƒฌใƒผใƒ ๅ€คใงใ™ใ€‚

ใƒ‘ใƒ•ใ‚ฉใƒผใƒžใƒณใ‚นใŒ่ฝใกใ‚‹ๅ ดๅˆใฏๅ€คใ‚’ๅคงใใใ—ใฆใใ ใ•ใ„ใ€‚

ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ1ใชใฎใงๆฏŽใƒ•ใƒฌใƒผใƒ ใงใ™ใ€‚

  • is_auto_focus_pause

ใƒ‡ใƒใƒƒใ‚ฌใƒผใ‚ฆใ‚ฃใƒณใƒ‰ใ‚ฆใ‚’ใƒ•ใ‚ฉใƒผใ‚ซใ‚นใ—ใŸใจใใซ่‡ชๅ‹•็š„ใซใ‚ฒใƒผใƒ ใฎSceneTreeใ‚’pausedใซใ—ใพใ™

  • display_float_decimal

floatใฎ่กจ็คบๆกๆ•ฐใฎๅˆถ้™ใงใ™ใ€‚

่กจ็คบใ ใ‘ใชใฎใงใ€ใใ‚ŒไปฅไธŠใฎๆกๆ•ฐใ‚’ๅ…ฅๅŠ›ใ—ใฆๅๆ˜ ใ•ใ›ใ‚‹ใจใกใ‚ƒใ‚“ใจๅๆ˜ ใ•ใ‚Œใพใ™ใ€‚่กจ็คบๆกๆ•ฐใฏๅˆถ้™ใ•ใ‚Œใพใ™ใ€‚

ใƒ‡ใƒ•ใ‚ฉใƒซใƒˆใฏ2ๆกใงใ™ใ€‚ 1.123456 โ†’ 1.12ใ€€ใจ่กจ็คบใ•ใ‚Œใพใ™

  • is_output_console_log

ใ“ใฎใ‚ขใƒ‰ใ‚ชใƒณใŒใ‚ณใƒณใ‚ฝใƒผใƒซใƒญใ‚ฐใซใƒญใ‚ฐใ‚’ๅ‡บๅŠ›ใ™ใ‚‹ใ‹

ใ‚ชใƒ•ใซใ™ใ‚‹ใจใ“ใฎใ‚ขใƒ‰ใ‚ชใƒณใฏprintใ—ใชใใชใ‚Šใพใ™ใ€‚

ๅค–้ƒจใƒ‡ใƒผใ‚ฟๆ›ดๆ–ฐๆ™‚ใซๅ…จใ‚นใ‚ฏใƒชใƒ—ใƒˆใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใฆๅฏพ่ฑกใ‚’ๆŽขใ™ใฎใงใ€ใƒญใ‚ฐใŒๆฏŽๅ›žใงใพใ™ใ€‚

  • ignore_script_paths

็„ก่ฆ–ใ™ใ‚‹ใ‚นใ‚ฏใƒชใƒ—ใƒˆใƒ‘ใ‚น

  • is_add_debugger_to_autoload_singleton

ใ€Œ่‡ชๅ‹•่ชญใฟ่พผใฟใ€๏ผˆAutoloadใ‚ทใƒณใ‚ฐใƒซใƒˆใƒณ๏ผ‰ใซ Live Debugger ใƒŽใƒผใƒ‰ใ‚’่ฟฝๅŠ ใ™ใ‚‹ใ‹

ใ‚ชใƒณใซใ™ใ‚‹ใจ็™ป้Œฒใ•ใ‚Œใพใ™ใ€‚ใ‚ชใƒ•ใซใ™ใ‚‹ใจ็™ป้Œฒ่งฃ้™คใ•ใ‚Œใพใ™ใ€‚

ใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใฎใ€Œ่‡ชๅ‹•่ชญใฟ่พผใฟใ€ใ‹ใ‚‰่ฟฝๅŠ ๅ‰Š้™คใ—ใฆใ‚‚ใ‹ใพใ„ใพใ›ใ‚“ใ€‚

ใ“ใฎใ‚ขใƒ‰ใ‚ชใƒณใฏใฉใ“ใซ็ฝฎใ„ใฆใ‚‚ใ™ในใฆใฎใƒŽใƒผใƒ‰ใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใพใ™ใ€‚

็‰นๅฎšใฎใ‚ทใƒผใƒณใ ใ‘ใƒใ‚งใƒƒใ‚ฏใ—ใŸใ„ๅ ดๅˆใฏLiveDebugger.tscnใ‚ทใƒผใƒณใ‚’ใƒŽใƒผใƒ‰ใจใ—ใฆใƒ„ใƒชใƒผใซ่ฟฝๅŠ ใ™ใ‚‹ใ“ใจใ‚‚ใงใใพใ™ใ€‚

  • is_update_when_save_external_data

ๅค–้ƒจใƒ‡ใƒผใ‚ฟไฟๅญ˜ๆ™‚ใซ่‡ชๅ‹•ๆ›ดๆ–ฐใ™ใ‚‹ใ‹

ๅค–้ƒจใƒ‡ใƒผใ‚ฟๆ›ดๆ–ฐๆ™‚ใซๅ…จใ‚นใ‚ฏใƒชใƒ—ใƒˆใ‚’ใƒใ‚งใƒƒใ‚ฏใ—ใฆๅฏพ่ฑกใ‚’ๆŽขใ—ใพใ™ใ€‚

ใชใซใ‹ๆ›ดๆ–ฐใ™ใ‚‹ใŸใณใซๅ‘ผใฐใ‚Œใฆใ—ใพใ†ใฎใงใ€้‡ใใชใ‚‹ๅ ดๅˆใฏใ‚ชใƒ•ใซใ—ใฆใใ ใ•ใ„ใ€‚

ใใฎๅ ดๅˆใฏใ€ไปฃใ‚ใ‚Šใซ

ใ€Œใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใ€โ†’ใ€Œใƒ„ใƒผใƒซใ€โ†’ใ€ŒUpdate LiveDebugger Dataใ€ใ‚’ๅฎŸ่กŒใ—ใฆใใ ใ•ใ„ใ€‚

Contributing

่ฆๆœ›ใƒปๆๆกˆใƒปใƒใ‚ฐใƒฌใƒใƒผใƒˆใใ ใ•ใ„ใ€‚

Issue, PullRequestใชใฉใŠๅพ…ใกใ—ใฆใŠใ‚Šใพใ™ใ€‚

๏ผˆๅ…จ้ƒจๅฏพๅฟœใงใใ‚‹ใจใฏ้™ใ‚Šใพใ›ใ‚“๏ผ‰

License

MITใƒฉใ‚คใ‚ปใƒณใ‚นใงใ™ใ€‚

ๅฏ„ไป˜

ไพฟๅˆฉใ ใชใ‚ใจใชใฃใŸใ‚‰ใฉใ†ใžใŠ้ก˜ใ„ใ—ใพใ™


koreadme

Live Debugger ํ•œ๊ตญ์–ด README ๏ผˆKorean translation README๏ผ‰

๊ฒŒ์ž„ ์ƒํƒœ๋ฅผ ๋””๋ฒ„๊น…ํ•˜๊ธฐ ์œ„ํ•œ ๊ณ ์ˆ˜์ค€ ์œˆ๋„์šฐ์ž…๋‹ˆ๋‹ค.

ํ‘œ์‹œํ•˜๊ณ  ์‹ถ์€ ๋…ธ๋“œ์˜ ์†์„ฑ์„ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ฑฐ๋‚˜ ๊ฐ’์„ ํŽธ์ง‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๊ฒŒ์ž„ ์œˆ๋„์šฐ๋ฅผ ์‹คํ–‰ํ•˜๋ฉด ์‹ค์‹œ๊ฐ„์œผ๋กœ ์—…๋ฐ์ดํŠธ๋˜๋ฏ€๋กœ ํŽธ์ง‘ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

์กฐ์ž‘์„ ๋ฐฉํ•ดํ•˜์ง€ ์•Š๊ณ  ๊ฒŒ์ž„ ์ง„ํ–‰ ๋“ฑ์˜ ๋ณ€์ˆ˜๋ฅผ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

image

output.mp4

์„ค์น˜ ๋ฐ ์‚ฌ์šฉ ๋ฐฉ๋ฒ•

  1. ๋‹ค์šด๋กœ๋“œ ๋˜๋Š” Git ํด๋ก ์„ ํ†ตํ•ด ๋กœ์ปฌ PC์— ๋„ฃ์Šต๋‹ˆ๋‹ค.

  2. addons/godot-live-debugger๊ฐ€ ๋˜๋„๋ก ๋‹น์‹ ์˜ Godot ํ”„๋กœ์ ํŠธ๋กœ ์ด๋™/๋ณต์‚ฌํ•ฉ๋‹ˆ๋‹ค.

  3. Godot์˜ "ํ”„๋กœ์ ํŠธ ์„ค์ •" โ†’ "ํ”Œ๋Ÿฌ๊ทธ์ธ"์—์„œ godot-live-debugger๋ฅผ โœ…ํ•ฉ๋‹ˆ๋‹ค.

  4. ์ž๋™์œผ๋กœ "์ž๋™ ๋กœ๋“œ"์— LiveDebugger ์”ฌ์ด ๋“ฑ๋ก๋˜์–ด ์žˆ์Šต๋‹ˆ๋‹ค.

  5. ์•„๋ž˜์™€ ๊ฐ™์ด ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๊ณ  ์‹ถ์€ ๋…ธ๋“œ์˜ ์Šคํฌ๋ฆฝํŠธ์— ์„ค์ •์„ ํ•ฉ๋‹ˆ๋‹ค.

  6. ๊ฒŒ์ž„์„ ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

์Šคํฌ๋ฆฝํŠธ ์„ค์ •

#@Debug ์ฃผ์„ ๋ฐ”๋กœ ์•„๋ž˜์˜ ์†์„ฑ์„ ๋ชจ๋‹ˆํ„ฐ๋ง ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.

#@Debug
var property_1:int = 300

#---

# ํ•จ์ˆ˜๋ฅผ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. _process์—์„œ ๋งค ํ”„๋ ˆ์ž„ ํ˜ธ์ถœ๋˜๋ฏ€๋กœ ์ฃผ์˜ํ•˜์„ธ์š”.

#@Debug
func get_str():
	return "abc"

#---

# ใ€Œใ€๋‚˜ ''๋กœ ๋ณด๊ธฐ ์ข‹๊ฒŒ ํ‘œ์‹œ๋ฅผ ์œ„ํ•œ ์ด๋ฆ„์„ ๋ถ™์ผ ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

#@Debug'alias_name'
var property_2:String = ""

#@Debugใ€Œๅˆฅๅใ€

#---

# ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ ๋ถ™์ผ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ํŠธ๋ฆฌ ์•„์ดํ…œ์„ ์ ‘์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

#@Debug(category_name)
var property_3:Vector2 = Vector2.ZERO

#---

# ์นดํ…Œ๊ณ ๋ฆฌ๋Š” ์Šฌ๋ž˜์‹œ /๋กœ ํ•˜์œ„ ์นดํ…Œ๊ณ ๋ฆฌ๋กœ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ ‘๊ธฐ ๊ฐ€๋Šฅ.

#@Debug(cate1/nested_category2)
var property_4:Vector3 = Vector3.ZERO

#---

# ์†์„ฑ ์ด๋ฆ„ ์ง€์ •์œผ๋กœ ์†์„ฑ์„ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

#@Debug[position]

#---

# ์†์„ฑ ์ด๋ฆ„ ์ง€์ •์œผ๋กœ ๋‹ค๋ฅธ ๋…ธ๋“œ์˜ ์†์„ฑ์„ ์ง€์ •ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค. ๋‹จ, ๋ชจ๋‹ˆํ„ฐ๋ง๋งŒ ๊ฐ€๋Šฅํ•˜๊ณ  ํŽธ์ง‘์€ ๋ถˆ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

#@Debug[./ChildNode:position]

# ๋‚ด๋ถ€ ์ฒ˜๋ฆฌ์—์„œ๋Š” : ์•ž๊นŒ์ง€ get_node()ํ•˜๋ฏ€๋กœ %๋„ ์‚ฌ์šฉ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

#@Debug[%ChildNode:position]

#---

# {}๋กœ ๋ณด๊ธฐ ์ข‹๊ฒŒ ์ƒ‰์ƒ์„ ์ง€์ •ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

#@Debug{#RED}
var property_5:StringName = &""

#@Debug{#f0f0f0}
var property_6:bool = false

#---


# ์—ฌ๋Ÿฌ ์ง€์ •๋„ ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ˆœ์„œ๋Š” ์ƒ๊ด€์—†์Šต๋‹ˆ๋‹ค.

#@Debug(cate)'alias'{#RED}
var property_7:int = 123

#@Debug{#f0f0f0}
var property_8:bool = false

#---

# #@Debug ๋Œ€์‹  #@Call๋กœ ํ•จ์ˆ˜๋ฅผ ์ง€์ •ํ•˜๋ฉด ๋ฒ„ํŠผ์ด ํ‘œ์‹œ๋˜๊ณ , ๋ˆ„๋ฅด๋ฉด ํ•ด๋‹น ํ•จ์ˆ˜๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค. ๋ชจ๋‹ˆํ„ฐ๋ง ๋Œ€์ƒ์œผ๋กœ ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.
# ํ•จ์ˆ˜์˜ return ๊ฒฐ๊ณผ๊ฐ€ ๊ฐ’์œผ๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค. ์ธ์ˆ˜ 1๊ฐœ๋ฅผ ๊ฐ’์œผ๋กœ ์ž…๋ ฅํ•˜์—ฌ ์‹คํ–‰ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

#@Call
func play() -> String:
	animation_player.play()
	return anim_name

#@Call
func play_animation(anim_name:StringName) -> String:
	animation_player.play(anim_name)
	return anim_name

# ์Šคํฌ๋ฆฝํŠธ์˜ ์–ด๋”˜๊ฐ€์— ์“ฐ๊ธฐ
# ์ด Node Name๊ณผ ์ผ์น˜ํ•˜๋Š” Node Name์„ ๊ฐ€์ง„ Node๋งŒ์„ Watch ๋Œ€์ƒ์œผ๋กœ ํ•ฉ๋‹ˆ๋‹ค.
#@DebugNode(NodeName1)

Project Settings ํ”„๋กœ์ ํŠธ ์„ค์ •

Debug Window ๋””๋ฒ„๊ทธ ์œˆ๋„์šฐ ์„ค์ •

  • always_on_top

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ๋ฅผ ํ•ญ์ƒ ์ตœ์ƒ์œ„์— ํ‘œ์‹œ

  • Always on top : ํ•ญ์ƒ ๋งจ ์•ž๋ฉด์— ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
  • Show when main window focused : ๊ฒŒ์ž„์˜ ๋ฉ”์ธ ์œˆ๋„์šฐ๋ฅผ ํฌ์ปค์Šค ํ•  ๋•Œ ์•ž์œผ๋กœ ๋‚˜์˜ต๋‹ˆ๋‹ค.
  • None : None.
  • debugger_window_position_type

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์˜ ์œ„์น˜ ์ข…๋ฅ˜

  • ๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์˜ ์œ„์น˜ ์ข…๋ฅ˜
  • ๊ฒŒ์ž„ ์™ผ์ชฝ ์ธ์ ‘
  • ํ™”๋ฉด ์˜ค๋ฅธ์ชฝ ์ธ์ ‘
  • ํ™”๋ฉด ์™ผ์ชฝ ์ธ์ ‘
  • ์ ˆ๋Œ€ ์œ„์น˜ ์ง€์ •
  • is_debugger_window_height_adjust_monitor_height

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์˜ ๋†’์ด๋ฅผ ๋ชจ๋‹ˆํ„ฐ์˜ ๋†’์ด์— ๋งž์ถœ์ง€ ์—ฌ๋ถ€

์œˆ๋„์šฐ์˜ ๋†’์ด๊ฐ€ ๋ชจ๋‹ˆํ„ฐ ์ „์ฒด๊นŒ์ง€ ๋Š˜์–ด๋‚ฉ๋‹ˆ๋‹ค. debugger_window_size์˜ Y๋ฅผ ๋ฌด์‹œํ•ฉ๋‹ˆ๋‹ค. debugger_window_position_offset์˜ Y๋ฅผ ์ด๋™ํ•˜์—ฌ ์œ„์น˜๋ฅผ ๋‚ด๋ฆฌ๋ฉด ๊ทธ๋งŒํผ ์ž‘์•„์ง‘๋‹ˆ๋‹ค.

์ ˆ๋Œ€ ์œ„์น˜ ์ง€์ •์ผ ๊ฒฝ์šฐ ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค.

  • debugger_window_position_offset

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ ์œ„์น˜์˜ ์˜คํ”„์…‹ (์œ„์น˜ ์ด๋™)

์œˆ๋„์šฐ์˜ ์œ„์น˜๋ฅผ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.

์ ˆ๋Œ€ ์œ„์น˜ ์ง€์ •์ผ ๊ฒฝ์šฐ ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค.

  • debugger_window_absolute_position

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์˜ ์ ˆ๋Œ€ ์œ„์น˜

์ ˆ๋Œ€ ์œ„์น˜ ์ง€์ •์ผ ๊ฒฝ์šฐ์—๋งŒ ์œ ํšจํ•ฉ๋‹ˆ๋‹ค.

๋ฉ€ํ‹ฐ ๋ชจ๋‹ˆํ„ฐ์ผ ๊ฒฝ์šฐ ๋ชจ๋“  ๋ชจ๋‹ˆํ„ฐ ์œ„์น˜๊ฐ€ ์˜ํ–ฅ์„ ๋ฏธ์น˜๋ฏ€๋กœ ํ™”๋ฉด ๋ฐ–์œผ๋กœ ํŠ€์–ด๋‚˜๊ฐ€๊ธฐ ์‰ฝ์Šต๋‹ˆ๋‹ค. ์ฃผ์˜ํ•˜์„ธ์š”.

  • debugger_window_size

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์˜ ํฌ๊ธฐ

is_debugger_window_height_adjust_monitor_height๊ฐ€ ์ผœ์ ธ ์žˆ์„ ๊ฒฝ์šฐ Y๋Š” ๋ฌด์‹œ๋ฉ๋‹ˆ๋‹ค.

Debugger ๋””๋ฒ„๊ฑฐ ์„ค์ •

  • frame_interval

๋ช‡ ํ”„๋ ˆ์ž„๋งˆ๋‹ค ๋…ธ๋“œ๋ฅผ ์ฒดํฌํ• ์ง€์— ๋Œ€ํ•œ ํ”„๋ ˆ์ž„ ๊ฐ’์ž…๋‹ˆ๋‹ค.

์„ฑ๋Šฅ์ด ๋–จ์–ด์งˆ ๊ฒฝ์šฐ ๊ฐ’์„ ํฌ๊ฒŒ ํ•ด์ฃผ์„ธ์š”.

๊ธฐ๋ณธ๊ฐ’์€ 1์ด๋ฏ€๋กœ ๋งค ํ”„๋ ˆ์ž„์ž…๋‹ˆ๋‹ค.

  • is_auto_focus_pause

๋””๋ฒ„๊ฑฐ ์œˆ๋„์šฐ์— ํฌ์ปค์Šค๋˜์—ˆ์„ ๋•Œ ์ž๋™์œผ๋กœ ๊ฒŒ์ž„์˜ SceneTree๋ฅผ ์ผ์‹œ ์ •์ง€ํ•ฉ๋‹ˆ๋‹ค.

  • display_float_decimal

float์˜ ํ‘œ์‹œ ์ž๋ฆฟ์ˆ˜ ์ œํ•œ์ž…๋‹ˆ๋‹ค.

ํ‘œ์‹œ๋งŒ ์ œํ•œ๋˜๋ฏ€๋กœ, ๊ทธ ์ด์ƒ์˜ ์ž๋ฆฟ์ˆ˜๋ฅผ ์ž…๋ ฅํ•˜์—ฌ ๋ฐ˜์˜์‹œํ‚ค๋ฉด ์ œ๋Œ€๋กœ ๋ฐ˜์˜๋ฉ๋‹ˆ๋‹ค. ํ‘œ์‹œ ์ž๋ฆฟ์ˆ˜๋Š” ์ œํ•œ๋ฉ๋‹ˆ๋‹ค.

๊ธฐ๋ณธ๊ฐ’์€ 2์ž๋ฆฌ์ž…๋‹ˆ๋‹ค. 1.123456 โ†’ 1.12๋กœ ํ‘œ์‹œ๋ฉ๋‹ˆ๋‹ค.

  • is_output_console_log

์ด ์• ๋“œ์˜จ์ด ์ฝ˜์†” ๋กœ๊ทธ์— ๋กœ๊ทธ๋ฅผ ์ถœ๋ ฅํ• ์ง€ ์—ฌ๋ถ€

๋„๋ฉด ์ด ์• ๋“œ์˜จ์€ printํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์™ธ๋ถ€ ๋ฐ์ดํ„ฐ ์—…๋ฐ์ดํŠธ ์‹œ ๋ชจ๋“  ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ฒดํฌํ•˜์—ฌ ๋Œ€์ƒ์„ ์ฐพ์œผ๋ฏ€๋กœ ๋กœ๊ทธ๊ฐ€ ๋งค๋ฒˆ ์ถœ๋ ฅ๋ฉ๋‹ˆ๋‹ค.

  • ignore_script_paths

๋ฌด์‹œํ•  ์Šคํฌ๋ฆฝํŠธ ๊ฒฝ๋กœ

  • is_add_debugger_to_autoload_singleton

"์ž๋™ ๋กœ๋“œ" (Autoload ์‹ฑ๊ธ€ํ†ค)์— Live Debugger ๋…ธ๋“œ๋ฅผ ์ถ”๊ฐ€ํ• ์ง€ ์—ฌ๋ถ€

์ผœ๋ฉด ๋“ฑ๋ก๋ฉ๋‹ˆ๋‹ค. ๋„๋ฉด ๋“ฑ๋ก ํ•ด์ œ๋ฉ๋‹ˆ๋‹ค.

ํ”„๋กœ์ ํŠธ์˜ "์ž๋™ ๋กœ๋“œ"์—์„œ ์ถ”๊ฐ€/์‚ญ์ œํ•ด๋„ ๋ฉ๋‹ˆ๋‹ค.

์ด ์• ๋“œ์˜จ์€ ์–ด๋””์— ๋‘์–ด๋„ ๋ชจ๋“  ๋…ธ๋“œ๋ฅผ ์ฒดํฌํ•ฉ๋‹ˆ๋‹ค.

ํŠน์ • ์”ฌ๋งŒ ์ฒดํฌํ•˜๊ณ  ์‹ถ์€ ๊ฒฝ์šฐ LiveDebugger.tscn ์”ฌ์„ ๋…ธ๋“œ๋กœ์„œ ํŠธ๋ฆฌ์— ์ถ”๊ฐ€ํ•  ์ˆ˜๋„ ์žˆ์Šต๋‹ˆ๋‹ค.

  • is_update_when_save_external_data

์™ธ๋ถ€ ๋ฐ์ดํ„ฐ ์ €์žฅ ์‹œ ์ž๋™ ์—…๋ฐ์ดํŠธ ์—ฌ๋ถ€

์™ธ๋ถ€ ์—…๋ฐ์ดํŠธ ์‹œ ๋ชจ๋“  ์Šคํฌ๋ฆฝํŠธ๋ฅผ ์ฒดํฌํ•˜์—ฌ ๋Œ€์ƒ์„ ์ฐพ์Šต๋‹ˆ๋‹ค.

๋ฌด์–ธ๊ฐ€ ์—…๋ฐ์ดํŠธํ•  ๋•Œ๋งˆ๋‹ค ํ˜ธ์ถœ๋˜๋ฏ€๋กœ ๋ฌด๊ฑฐ์›Œ์งˆ ๊ฒฝ์šฐ ๊บผ์ฃผ์„ธ์š”.

๊ทธ ๊ฒฝ์šฐ ๋Œ€์‹ ์—

"ํ”„๋กœ์ ํŠธ" โ†’ "๋„๊ตฌ" โ†’ "Update LiveDebugger Data"๋ฅผ ์‹คํ–‰ํ•ด์ฃผ์„ธ์š”.

Contributing ๊ธฐ์—ฌ

์š”์ฒญ, ์ œ์•ˆ, ๋ฒ„๊ทธ ๋ฆฌํฌํŠธ๋ฅผ ํ•ด์ฃผ์„ธ์š”.

์ด์Šˆ, ํ’€ ๋ฆฌํ€˜์ŠคํŠธ ๋“ฑ ๊ธฐ๋‹ค๋ฆฌ๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

License ๋ผ์ด์„ ์Šค

MIT ๋ผ์ด์„ ์Šค์ž…๋‹ˆ๋‹ค.

Donate ๊ธฐ๋ถ€

ํŽธ๋ฆฌํ•˜๋‹ค๊ณ  ์ƒ๊ฐ๋˜๋ฉด ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.