Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

Supoort attach/detach remote headless server without kill process #2125

Merged
merged 6 commits into from
Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 152 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -370,20 +370,28 @@
]
}
},
{
"label": "Go: Attach to local process",
"description": "Attach to an existing process by process ID",
"body": {
"name": "${1:Attach to Process}",
"type": "go",
"request": "attach",
"mode": "local",
"processId": 0
}
},
{
"label": "Go: Connect to server",
"description": "Connect to a remote headless debug server",
"body": {
"name": "${3:Connect to server}",
"name": "${1:Connect to server}",
"type": "go",
"request": "launch",
"request": "attach",
"mode": "remote",
"remotePath": "^\"\\${workspaceFolder}${1:}\"",
"remotePath": "^\"\\${workspaceFolder}\"",
"port": 2345,
"host": "127.0.0.1",
"program": "^\"\\${workspaceFolder}${1:}\"",
"env": {},
"args": []
"host": "127.0.0.1"
ramya-rao-a marked this conversation as resolved.
Show resolved Hide resolved
}
}
],
Expand Down Expand Up @@ -559,6 +567,143 @@
"description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not."
}
}
},
"attach": {
"required": [],
"properties": {
"processId": {
"type": "number",
"description": "The ID of the process to be debugged."
},
"mode": {
"enum": [
"local",
"remote"
],
"description": "Indicates local or remote debugging. Local maps to the dlv 'attach' command, remote maps to 'connect'.",
"default": "local"
},
"stopOnEntry": {
"type": "boolean",
"description": "Automatically stop program after launch.",
"default": false
},
"showLog": {
"type": "boolean",
"description": "Show log output from the delve debugger.",
"default": false
},
"cwd": {
"type": "string",
"description": "Workspace relative or absolute path to the working directory of the program being debugged. Default is the current workspace.",
"default": "${workspaceFolder}"
},
"remotePath": {
"type": "string",
"description": "If remote debugging, the path to the source code on the remote machine, if different from the local machine.",
"default": ""
},
"port": {
"type": "number",
"description": "The port that the delve debugger will be listening on.",
"default": 2345
},
"host": {
"type": "string",
"description": "The host name of the machine the delve debugger will be listening on.",
"default": "127.0.0.1"
},
"trace": {
"type": [
"boolean",
"string"
],
"enum": [
"verbose",
true
],
"default": true,
"description": "When 'true', the extension will log diagnostic info to a file. When 'verbose', it will also show logs in the console."
},
"backend": {
"type": "string",
"enum": [
"default",
"native",
"lldb"
],
"description": "Backend used by delve. Only available in delve version 0.12.2 and above."
},
"logOutput": {
"type": "string",
"enum": [
"debugger",
"gdbwire",
"lldbout",
"debuglineerr",
"rpc"
],
"description": "Comma separated list of components that should produce debug output.",
"default": "debugger"
},
"dlvLoadConfig": {
"type": "object",
"properties": {
"followPointers": {
"type": "boolean",
"description": "FollowPointers requests pointers to be automatically dereferenced",
"default": true
},
"maxVariableRecurse": {
"type": "number",
"description": "MaxVariableRecurse is how far to recurse when evaluating nested types",
"default": 1
},
"maxStringLen": {
"type": "number",
"description": "MaxStringLen is the maximum number of bytes read from a string",
"default": 64
},
"maxArrayValues": {
"type": "number",
"description": "MaxArrayValues is the maximum number of elements read from an array, a slice or a map",
"default": 64
},
"maxStructFields": {
"type": "number",
"description": "MaxStructFields is the maximum number of fields read from a struct, -1 will read all fields",
"default": -1
}
},
"description": "LoadConfig describes to delve, how to load values from target's memory",
"default": {
"followPointers": true,
"maxVariableRecurse": 1,
"maxStringLen": 64,
"maxArrayValues": 64,
"maxStructFields": -1
}
},
"apiVersion": {
"type": "number",
"enum": [
1,
2
],
"description": "Delve Api Version to use. Default value is 2.",
"default": 2
},
"stackTraceDepth": {
"type": "number",
"description": "Maximum depth of stack trace collected from Delve",
"default": 50
},
"showGlobalVariables": {
"type": "boolean",
"default": true,
"description": "Boolean value to indicate whether global package variables should be shown in the variables pane or not."
}
}
}
}
}
Expand Down
Loading