初始化内容
This commit is contained in:
Vendored
+30
@@ -0,0 +1,30 @@
|
||||
import lldb
|
||||
|
||||
def __lldb_init_module(debugger, internal_dict):
|
||||
# 为你的类添加摘要
|
||||
debugger.HandleCommand('type summary add -x "dl::PointU" -F custom_printers.PointU_summary')
|
||||
debugger.HandleCommand('type summary add -x "dl::Point" -F custom_printers.Point_summary')
|
||||
debugger.HandleCommand('type summary add -x "dl::Position" -F custom_printers.Position_summary')
|
||||
debugger.HandleCommand('type summary add -x "dl::Point4" -F custom_printers.Point4_summary')
|
||||
|
||||
def PointU_summary(valobj, internal_dict):
|
||||
x = valobj.GetChildMemberWithName('x').GetValueAsUnsigned()
|
||||
y = valobj.GetChildMemberWithName('y').GetValueAsUnsigned()
|
||||
return f'PointU: {x, y}'
|
||||
|
||||
def Point_summary(valobj, internal_dict):
|
||||
x = valobj.GetChildMemberWithName('x').GetValueAsUnsigned()
|
||||
y = valobj.GetChildMemberWithName('y').GetValueAsUnsigned()
|
||||
return f'Point: {x, y}'
|
||||
|
||||
def Position_summary(valobj, internal_dict):
|
||||
x = valobj.GetChildMemberWithName('x').GetValue()
|
||||
y = valobj.GetChildMemberWithName('y').GetValue()
|
||||
return f'Position: {x, y}'
|
||||
|
||||
def Point4_summary(valobj, internal_dict):
|
||||
x = valobj.GetChildMemberWithName('x').GetValue()
|
||||
y = valobj.GetChildMemberWithName('y').GetValue()
|
||||
z = valobj.GetChildMemberWithName('z').GetValue()
|
||||
w = valobj.GetChildMemberWithName('w').GetValue()
|
||||
return f'Point4: {x, y, z, w}'
|
||||
Vendored
+44
@@ -0,0 +1,44 @@
|
||||
{
|
||||
// 使用 IntelliSense 了解相关属性。
|
||||
// 悬停以查看现有属性的描述。
|
||||
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "dl_test (Windows)",
|
||||
"type": "cppvsdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/project/dl_test/res/dl_test.exe",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/project/dl_test/res",
|
||||
"console": "externalTerminal"
|
||||
},
|
||||
{
|
||||
"name": "dl_test (Linux)",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/out/linux/project/dl_test/bin/dl_test",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/out/linux/project/dl_test/bin"
|
||||
},
|
||||
{
|
||||
"name": "HistorySim",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/out/linux/project/hs/bin/HistorySim",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/out/linux/project/hs/bin",
|
||||
"initCommands": [
|
||||
"command script import ${workspaceFolder}/.vscode/custom_printers.py"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dl_console",
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/out/linux/project/dl_console/bin/dl_console",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/out/linux/project/dl_console/bin"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user