Skip to content

Commit 5dc3457

Browse files
committed
update readme
1 parent f200f55 commit 5dc3457

File tree

3 files changed

+65
-3
lines changed

3 files changed

+65
-3
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,35 @@ say end
5353
```
5454

5555
After executing `function test:test_macro {"msg":"test"}`, we passed the value `test` to the macro argument `msg` and
56-
then the game will pause before `$say $(msg)`. At this time, you can use `/breakpoint get msg` to get the value `test`.
56+
then the game will pause before `$say $(msg)`. At this time, you can use `/breakpoint get msg` to get the value `test`.
57+
58+
* Get Function Stack
59+
60+
By using `/breakpoint stack`, you can get the function stack of the current game. For example, if we have following two
61+
functions:
62+
63+
```mcfunction
64+
#test:test1
65+
66+
say 1
67+
function test:test2
68+
say 2
69+
70+
#test: test2
71+
say A
72+
#breakpoint
73+
say B
74+
```
75+
76+
When the game pauses at the breakpoint, you can use `/breakpoint stack` and the function stack will be printed in the
77+
chat screen:
78+
79+
```
80+
test:test2
81+
test:test
82+
83+
```
84+
85+
* Run command in current context
86+
87+
By using `/breakpoint run <command>`, you can run any command in the current context, just like `execute ... run ...`.

README_zh.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,35 @@ say end
4949
```
5050

5151
在执行`function test:test_macro {"msg":"test"}`后,我们将值`test`传递给了宏参数`msg`。同时,在执行函数的过程中,游戏会在`$say $(msg)`
52-
之前触发断点暂停。这个时候,就可以使用`/breakpoint get msg`来获取到值`test`
52+
之前触发断点暂停。这个时候,就可以使用`/breakpoint get msg`来获取到值`test`
53+
54+
55+
* 获取函数栈
56+
* Get Function Stack
57+
58+
使用`/breakpoint stack`可以获取到当前游戏的函数栈。例如,如果我们有以下两个函数:
59+
60+
```mcfunction
61+
#test:test1
62+
63+
say 1
64+
function test:test2
65+
say 2
66+
67+
#test: test2
68+
say A
69+
#breakpoint
70+
say B
71+
```
72+
73+
当游戏暂停在断点位置的时候,在聊天栏执行`/breakpoint stack`即可将函数调用栈打印在聊天栏中。
74+
75+
```
76+
test:test2
77+
test:test
78+
79+
```
80+
81+
* 在当前上下文中运行命令
82+
83+
通过`/breakpoint run <command>`,你可以在当前上下文中运行任何命令,就像`execute ... run ...`一样。

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ yarn_mappings=1.21+build.9
99
loader_version=0.15.11
1010

1111
# Mod Properties
12-
mod_version=1.0.1
12+
mod_version=1.1.0
1313
maven_group=top.mcfpp.mod.debugger
1414
archives_base_name=datapack-debugger
1515

0 commit comments

Comments
 (0)