debug and vscode debug launch
This commit is contained in:
parent
ecddc2fe21
commit
d1df98ad3e
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,3 +10,4 @@
|
|||||||
*.bmp
|
*.bmp
|
||||||
build/Output
|
build/Output
|
||||||
tacticalagent-v*
|
tacticalagent-v*
|
||||||
|
tacticalagent
|
18
.vscode/launch.json
vendored
Normal file
18
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
// 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 file",
|
||||||
|
"type": "go",
|
||||||
|
"request": "launch",
|
||||||
|
"mode": "debug",
|
||||||
|
"env": {},
|
||||||
|
"args": ["-m", "svc", "-logto", "stdout"],
|
||||||
|
"buildFlags": "-tags=DEBUG",
|
||||||
|
"program": "${workspaceRoot}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
@ -49,6 +49,10 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func (a *Agent) RunRPC() {
|
func (a *Agent) RunRPC() {
|
||||||
|
if rmm.DEBUG {
|
||||||
|
a.Logger.Infoln("DEBUG MODE")
|
||||||
|
}
|
||||||
|
|
||||||
a.Logger.Infoln("Agent service started")
|
a.Logger.Infoln("Agent service started")
|
||||||
go a.RunAsService()
|
go a.RunAsService()
|
||||||
var wg sync.WaitGroup
|
var wg sync.WaitGroup
|
||||||
|
5
shared/debug.go
Normal file
5
shared/debug.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
//go:build DEBUG
|
||||||
|
|
||||||
|
package shared
|
||||||
|
|
||||||
|
const DEBUG = true
|
5
shared/nodebug.go
Normal file
5
shared/nodebug.go
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
//go:build !DEBUG
|
||||||
|
|
||||||
|
package shared
|
||||||
|
|
||||||
|
const DEBUG = false
|
Loading…
Reference in New Issue
Block a user