Add some debugging util

This commit is contained in:
Marcel Schramm 2020-10-25 12:38:24 +01:00
parent c2de2873ff
commit 57c05c571a
No known key found for this signature in database
GPG Key ID: 05971054C70EEDC7
4 changed files with 24 additions and 1 deletions

2
.gitignore vendored
View File

@ -5,7 +5,7 @@ cordless_linux_64
cordless
cordless_64.exe
cordless_32.exe
.vscode/
cordless_debug
.idea/
*.log
theme.json

17
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,17 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "attach",
"mode": "remote",
"remotePath": "${workspaceFolder}",
"port": 2345,
"host": "127.0.0.1"
},
]
}

3
build_debug.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
go build -gcflags="all=-N -l" -o cordless_debug

3
debug.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
dlv --listen=:2345 --headless=true --api-version=2 --accept-multiclient exec ./cordless_debug