Exit the debugger by clicking Continue on the debugger bar or hit F5. Then Hover over the variable name on line 7 to see its value. Or use keyboard shortcut (Ctrl+Shift+D).Ĭlick Run and Debug, or hit F5 to run the debugger. Or place your cursor on line 7 and hit F9.īring up the Debug view by clicking on the debug icon in the Activity Bar on the side of Visual Studio Code. Open a terminal, Terminal > New Terminal, then run the command go mod init sample-app to initialize your sample Go app.Ĭopy the following code into the main.go file.Ĭreate a break point on line 7 by left clicking to the left of the numbered line. To open the folder, click the Explorer icon in the Activity Bar then click Open Folder.Ĭlick New Folder in the Explorer panel, then Create the root director for your sample Go application named sample-appĬlick New File in the Explorer panel, then name the file main.go In Visual Studio Code, open the folder where you'll create the root directory of your Go application. Wait for the Go tools to finish updating.ĥ. When prompted, select all the available Go tools then click OK. Search for Go: Install/Update tools then run the command from the pallet Or use the keyboard shortcut (Ctrl+Shift+P) In Visual Studio Code, open Command Palette's Help > Show All Commands. A Go installation and other additional tools are required for full operation of. Search for the Go extension, then select install. Free for non-commerical use, Other, Other Open Source, MIT. In Visual Studio Code, bring up the Extensions view by clicking on the Extensions icon in the Activity Bar.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |