[Tool] VSCode Debug TiKV Cannot Stop at Breakpoint

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}"
}
| username: atidat | Original post link

Using the same method, I wrote a Rust demo, and both launch and attach can stop at the breakpoint.

| username: atidat | Original post link

| username: Lucien-卢西恩 | Original post link

Hello, you can submit the issue to GitHub - pingcap/tiup: A component manager for TiDB, and the R&D team will assist you in checking it.

| username: system | Original post link

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.