Open kindlychung opened 7 years ago
This looks like the same problem I'm having when attempting to step through a program.
I've reduced it to a trivial example, 100% reproducible:
package main
import (
"log"
"github.com/gwenn/gosqlite"
)
func main() {
log.Print("First")
log.Print("Second")
log.Print("Third")
}
func GetSQLiteRowCount() int {
sqlite.Open("foo.db", sqlite.OpenReadOnly)
return 0
}
(no need to create foo.db first)
This example runs fine. However, if you put a breakpoint on any of the log.Print()
lines (eg "Second"), you can't proceed beyond it in Debug mode once it's hit. eg "Step Over" → program hang
First
Second
[hung program]
For me, this is pretty much a complete blocker. I have a server application I'm attempting to debug, and the hanging can't be worked around (I've tried various things over the last few hours).
So now I'm using Println statements, and need to find something practical that works.
UPDATE - This also happens in Gogland on OSX. It doesn't happen with WebStorm 2016.3.3 on Fedora Linux. Trying various other things now.
UPDATE 2 - Also reported against Gogland, which has a workaround: https://youtrack.jetbrains.com/issue/GO-3511
plus one
@whilei If you're up for using Gogland, many of the debugging issues with this plugin are fixed there:
:smile:
@justinclift aha! woops, hold on a second... I am using Gogland.
UPDATE 2 - Also reported against Gogland, which has a workaround: https://youtrack.jetbrains.com/issue/GO-3511
misread that too fast. thanks for sending me in the right direction
No worries. :smile:
Plugin version : 0.13.1924
IDE name and version: IntelliJ IDEA 2016.3.3
Build #IC-163.11103.6, built on January 16, 2017
JRE: 1.8.0_112-release-408-b6 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
OS name and version: MacOS Sierra
What are you trying to do?
I was justing trying to step over some functions.
The program should run until the next breakpoint.
Program freezes.
The entire project can be found here: https://github.com/kindlychung/code/blob/master/chapter2/sample/main.go (Code samples from the book Go in Action)
Video demo: https://www.youtube.com/watch?v=JtZb0J28NUI&feature=youtu.be