Setup debug make to support vscode debug

This commit is contained in:
Greg Solo
2021-04-27 20:19:48 -04:00
committed by Paul Chote
parent a5a371f1ff
commit c9b9efe745
2 changed files with 15 additions and 1 deletions

2
.vscode/tasks.json vendored
View File

@@ -4,7 +4,7 @@
{ {
"label": "build", "label": "build",
"command": "make", "command": "make",
"args": ["all"], "args": ["debug"],
"windows": { "windows": {
"command": "make.cmd" "command": "make.cmd"
} }

View File

@@ -86,6 +86,20 @@ ifeq ($(TARGETPLATFORM), unix-generic)
endif endif
@./fetch-geoip.sh @./fetch-geoip.sh
##################### DEVELOPMENT BUILDS AND TESTS (WITH DEBUG) #####################
#
debug:
ifeq ($(RUNTIME), mono)
@command -v $(firstword $(MSBUILD)) >/dev/null || (echo "OpenRA requires the '$(MSBUILD)' tool provided by Mono >= 6.4."; exit 1)
@$(MSBUILD) -t:Build -restore -p:Configuration=Release -p:TargetPlatform=$(TARGETPLATFORM) -p:Mono=true
else
@$(DOTNET) build -c Debug -nologo -p:TargetPlatform=$(TARGETPLATFORM)
endif
ifeq ($(TARGETPLATFORM), unix-generic)
@./configure-system-libraries.sh
endif
@./fetch-geoip.sh
# dotnet clean and msbuild -t:Clean leave files that cause problems when switching between mono/dotnet # dotnet clean and msbuild -t:Clean leave files that cause problems when switching between mono/dotnet
# Deleting the intermediate / output directories ensures the build directory is actually clean # Deleting the intermediate / output directories ensures the build directory is actually clean
clean: clean: