[ANN] Hopwatch, a debugging tool for Go

918 views
Skip to first unread message

Ernest Micklei

unread,
Dec 14, 2012, 3:03:44 PM12/14/12
to golan...@googlegroups.com
Hopwatch is an experimental tool in HTML5 that can help debugging Go programs. 
It works by two-way communicating commands using a websocket between Go and Javascript in a browser.

When your program calls the Break function, it sends debug information to the browser page and waits for user interaction.
On the hopwatch page, the developer can view debug information and choose to resume the execution of the program.


^ Ernest

lgo

unread,
Dec 15, 2012, 12:28:43 AM12/15/12
to golang-nuts
interesting, good job

André Moraes

unread,
Dec 17, 2012, 5:23:13 AM12/17/12
to Ernest Micklei, golan...@googlegroups.com
Nice tool, I would suggest to include some form of Println, similar to
Display but without the requirement to use a even number of arguments.

Also, https://github.com/emicklei/hopwatch/blob/master/hopwatch.go#L167
should return an error if the offset is less than zero.

Good job.

--
André Moraes
http://amoraes.info

Joe Farro

unread,
Dec 30, 2012, 9:44:48 PM12/30/12
to golan...@googlegroups.com
Hey, nice work. 

I was working on a browser based GDB gui. It's a WIP, but the output parser might be interesting if you're considering integrating with the gdb:


I usually only do front-end programming, this is a first for spawning processes, concurrency, etc. So, possibly things look a little sketchy in there... have no idea, really.

Some info on the GDB MI format:

Ernest Micklei

unread,
Dec 31, 2012, 9:03:05 AM12/31/12
to golan...@googlegroups.com
Thank you for the suggestion and example code. Will have a look at it next year (only a few hours away....)

Op maandag 31 december 2012 03:44:48 UTC+1 schreef Joe Farro het volgende:

Ernest Micklei

unread,
Feb 16, 2013, 2:58:17 PM2/16/13
to golan...@googlegroups.com
Just merged new changes that includes the feature to show the actual Go source and linenumber where the Break(..) was called. Have a look the snapshot on https://github.com/emicklei/hopwatch.
Other minor addition are auto-scroll to last the entry, an option to disable the Break function (use the browser as a logger) and integration with go-spew.

^ Ernest

Op vrijdag 14 december 2012 21:03:44 UTC+1 schreef Ernest Micklei het volgende:

John McLaughlin

unread,
Jul 2, 2013, 5:33:09 PM7/2/13
to golan...@googlegroups.com
I must say that I'm glad I stumbled across this -- very impressive.....
Reply all
Reply to author
Forward
0 new messages