O'Reilly logo

Isomorphic Go by Kamesh Balasubramanian

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Tracing code to pinpoint the source of issues

Another good client-side debugging practice is tracing, the practice of printing out key steps in the flow of a program. In a debugging scenario, this would consist of strategically making calls to the println (or fmt.Println) function around suspected areas of problematic code. You can use the web browser's console to verify that these print statements are reached, which will give you a better understanding of how the client-side program is functioning while it is running.

For example, when debugging the issue introduced in the previous section, we can place the following println calls in the run function:

func run() {  //println("IGWEB Client Application")  println("Reached the run function") ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required