-
-
Save perj/ec75ee651135ba0ba9aa64fc7eeb4033 to your computer and use it in GitHub Desktop.
Debugging magefile in VSCode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Mage", | |
"type": "go", | |
"request": "launch", | |
"mode": "auto", | |
"program": "mage_output_file.go", | |
// Pass magefile as a separate argument, VSCode doesn't allow more than one file in "program". | |
"buildFlags": "magefile.go", | |
"preLaunchTask": "create mage_output_file.go", | |
"postDebugTask": "delete mage_output_file.go" | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "create mage_output_file.go", | |
"type": "shell", | |
"command": "mage --keep" | |
}, | |
{ | |
"label": "delete mage_output_file.go", | |
"type": "shell", | |
"command": "rm -f mage_output_file.go" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment