Lightning Talk
Introductory
Swiss knife for Go debugging with VSCode
1:20 - 1:25 PM ET ; Epic Hall Room
One of the most important things when we're writing code is the ability to debug it. Many IDEs have an integrated debugger that can smoothen our coding experience. The debugger for the Go source code is called Delve. It's tightly integrated with VSCode and the Go extension. As you might know, the debugger allows us to step through our code, focus on specific sections that may deserve more attention, inspect variables' values, stack traces, etc.
Sometimes, debugging turns into a hassle. The process supposed to help us becomes an insurmountable obstacle. Sometimes, we abandon the debugging or log directly into the code. Both of the options end up decreasing our productivity as developers.
Thus, this talk aims to provide a working solution to debug Go code in VSCode. I chose this IDE since it's free, highly customizable, performant, and my favorite!
Since we can build different projects, I try to provide you with a working solution for each. The scenarios you're likely to face are (list not exhaustive):
- Debug unit tests
- Debug integration tests
- Debug a package
- Attach to an already running process (both locally and remotely)
- Debug multiple microservices with the compound configuration
To overcome these challenges, you're requested to tweak settings in the `launch.json` file within the hidden .vscode folder. In this file are listed what are known as profiles. These are selectable in the "Run View" area. Within this file, we have the option to set different values, such as:
- environment variables or env file
- whether to show global variables' values
- which console to use
- and many others
Throughout this talk, I share hints on Delve and how to make the most of it. I also touch on some overlooked aspects of VSCode that can make a huge difference in your debugging experience.
Finally, I'll give you some mind-blowing tips and tricks on debugging. If you'd like to improve your debugging skills, please don't miss my session!
Ivan Pesenti
Ivan is an Italian guy who loves coding and computer stuff. He lives in a small town in the north of Italy.
Since 2014, he works as a software developer. He's mainly focused on server-side programming, especially in building Web APIs and serverless applications. Two of his major concerns about software development are code security and tests.
During his spare time, he loves sharing his knowledge with the community by giving talks related to computer science stuff. He also writes technical blog posts sharing his expertise and best practices. He's also a mentor for junior developers and also for students who aim to be professional software developers in their lives. He tries to help everyone (without distinction in gender, nationality, age, and so on) with empathy and determination. He's also a course author.
One of the things he loves most by far is problem-solving. His attitude reflects on Q&A platforms, like Stack Overflow, where he tries to help others figure out their challenges.
He's a great listener. One of his mantras is: "We can learn everything from everyone.".
He's funny and loves spending time with friends and geeks. During his activities, his primary goal is not to be toxic in the community. He always tries to help others with a smile without any distinction.
Visit us @ ca.kubehuddle.com
Grab your ticket @ Ticket Tailor