0

I am new to go language and for development purpose using LITEIDE with delve as debugger to debug my go code .

I have observed that sometimes I can debug well in LITEIDE with breakpoints being hit and I can use it properly . But sometimes it just doesnt work at all .

When it DOES NOT WORK i see messages like these in console

(dlv) Process restarted with PID 29878
(dlv) (dlv) (dlv) Breakpoint bk145085445 set at 0x206d for main.main() ./httpServer.go:15
(dlv) Breakpoint bk83028073 set at 0xd3546 for usagereports/requestHandlers.KeyHandler() ./requestHandlers/customerKeyHandler.go:39
(dlv) Breakpoint bk83028064 set at 0xd2e69 for usagereports/requestHandlers.KeyHandler() ./requestHandlers/customerKeyHandler.go:30
(dlv) Breakpoint bk83028049 set at 0xd2bc8 for usagereports/requestHandlers.KeyHandler() ./requestHandlers/customerKeyHandler.go:21
(dlv) Breakpoint 5 set at 0x2058 for main.main() ./httpServer.go:12
(dlv)

Now If I type next (to go to next line) or continue (for it to stop at next breakpoint) nothing happens . But the program has not hanged and I can see it getting executed (through log messages or see desired output/errors on screen) which means that LITEIDE is not working properly.

Can anyone guide here who uses LITEIDE with Delve and faced this problem

JimB
  • 104,193
  • 13
  • 262
  • 255
Ankur Garg
  • 2,553
  • 8
  • 30
  • 41
  • Does the exact same input work directly in delve? – JimB Jul 26 '16 at 19:25
  • I've experienced the same behavior. Everything seems to work directly in delve. In the cases that I've looked into, it seems to have something to do with debugging within a GoRoutine. – tier1 Jul 26 '16 at 19:34
  • I've not had good luck with the debugger either, to the point where I barely use it. I've been relying on log.Println() – GrandmasterB Jul 27 '16 at 03:50
  • I havent used delve directly , but tier1 answer is encouraging me to look into it. – Ankur Garg Jul 27 '16 at 07:59
  • Apparently , it doesn't seem to work even directly in delve making me think if its worth investing time into this. – Ankur Garg Jul 27 '16 at 19:49

0 Answers0