Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.Original topic: 【tool】vscode debug tikv 无法在断点处停住
|
username: atidat
Help! I’ve been working on this for two days and still can’t figure out why the process doesn’t stop at the breakpoint in both vscode attach/launch modes. The logs show that the breakpoints are set.
Steps for attach:
- tiup playground v6.2.0
- kill tikv-server
- tiup playground --kv.binpath=/xxx/xx/tikv-server v6.2.0
- vscode attach process
// attach vscode launch.json
{
"type": "lldb",
"request": "attach",
"name": "Attach tikv-server",
"program": "${workspaceRoot}/target/debug/tikv-server"
}
Steps for launch:
- vscode launch
// launch vscode launch.json
{
"type": "lldb",
"request": "launch",
"name": "Launch tikv-server",
"program": "${workspaceFolder}/target/debug/tikv-server",
"args": [
"--addr","127.0.0.1:20160",
"--advertise-addr","127.0.0.1:20160",
"--status-addr","127.0.0.1:20180",
"--pd","http://127.0.0.1:2379",
"--config","/root/.tiup/data/TGRw5sb/tikv-0/tikv.toml",
"--data-dir","/root/.tiup/data/TGRw5sb/tikv-0/data",
"--log-file","/root/.tiup/data/TGRw5sb/tikv-0/tikv.log"
],
"cwd": "${workspaceFolder}"
}