Skip to content
Open
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
df205b5
mostly working for osx, needs docs to be verified and more testing.
sylvainsf Jul 14, 2025
ea10cbc
start and stop scripts
sylvainsf Jul 17, 2025
e56570f
use proper scripts
sylvainsf Jul 17, 2025
8674626
mostly working just fixing some k8s context issues.
sylvainsf Jul 22, 2025
4589fd1
fully working!
sylvainsf Jul 23, 2025
0ecbf9e
think DE is finally fixed
sylvainsf Jul 23, 2025
9f7f071
proper script location
sylvainsf Jul 23, 2025
85475d1
moved all configs and scripts to build
sylvainsf Jul 23, 2025
b96a699
deployment succeeded!!! need to test dynamicrp, azure, and aws
sylvainsf Jul 24, 2025
5e21ed8
ignore demo symlink
sylvainsf Jul 24, 2025
0a1587d
removing empty file
sylvainsf Jul 24, 2025
b07f0d8
clean up launch tasks
sylvainsf Jul 24, 2025
aa0fd8e
fixed the orphaned prereqs check in make debug-start
sylvainsf Jul 29, 2025
f502cd4
cleaned up bad and confusing make targets
sylvainsf Jul 29, 2025
c2ad755
remove unneeded lock file
sylvainsf Jul 29, 2025
b6810d8
fix ucp startup time issue and check postgres properly
sylvainsf Aug 11, 2025
62e5898
address pr comments
sylvainsf Sep 13, 2025
2985cce
added drad vscode target, deprecation banner to old instructions.
sylvainsf Sep 13, 2025
f99a8a5
remove deprecated script
sylvainsf Sep 13, 2025
e95be97
ignore drad script
sylvainsf Sep 13, 2025
3a84ba2
support both brew and docker postgres auth patterns
sylvainsf Sep 15, 2025
4be1d9d
fix table permissions
sylvainsf Sep 15, 2025
42c7d26
remove the deprecated target
sylvainsf Sep 16, 2025
5c0c298
fixed psql detection for brew vs docker
sylvainsf Sep 16, 2025
21dd0e4
better linux support
sylvainsf Sep 18, 2025
4d6fa20
corrected docs
sylvainsf Sep 19, 2025
99120db
clarified workflow
sylvainsf Sep 19, 2025
35a6be7
fixed hard coded path
sylvainsf Sep 19, 2025
b622deb
clearer stop comment
sylvainsf Sep 19, 2025
03bf912
Update .vscode/launch.json for multiple args on cli
sylvainsf Sep 22, 2025
6415aa2
merge resolution
sylvainsf Oct 10, 2025
47f1b81
Merge remote-tracking branch 'origin/automated-debug-environment' int…
sylvainsf Oct 10, 2025
57b8b59
Merge remote-tracking branch 'upstream/main' into automated-debug-env…
sylvainsf Dec 1, 2025
d5d3818
fixes port issue for k3d
sylvainsf Dec 1, 2025
6a9a2fb
Update docs/contributing/contributing-code/contributing-code-debuggin…
sylvainsf Dec 9, 2025
cf5013b
Cleaned up and fixed all vscode tasks and launch configs
sylvainsf Dec 10, 2025
86a1dc9
Merge remote-tracking branch 'origin/automated-debug-environment' int…
sylvainsf Dec 10, 2025
5c98d1c
fixed debian install for correct version
sylvainsf Dec 10, 2025
47f9824
Merge branch 'main' into automated-debug-environment
sylvainsf Dec 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ hack/bicep-types-radius/generated/**/*.md

# Debug files
debug_files/*
drad
*.lock

# Demo app
demo/*
Expand Down
16 changes: 16 additions & 0 deletions .vscode/get-pid.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
# Simple script to read PID from file
# Usage: get-pid.sh <component-name>

if [ -z "$1" ]; then
echo "0"
exit 1
fi

PID_FILE="debug_files/logs/$1.pid"

if [ -f "$PID_FILE" ]; then
cat "$PID_FILE"
else
echo "0"
fi
132 changes: 21 additions & 111 deletions .vscode/launch.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to attach a debugger to the CLI using the configurations in this file, but I was not able to effectively debug any CLI command that has interactive input, like rad init. This may be an issue with the CLI framework we use rather than this particular configuration. (This is just a comment, not a request for a fix.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick(style): lint/format of this file will cause better readability, now big one-liners are hard to read

Original file line number Diff line number Diff line change
@@ -1,113 +1,23 @@
{
// 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": "Debug rad CLI",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/rad/main.go",
"cwd": "${workspaceFolder}",
"args": []
},
{
"name": "Debug rad CLI (prompt for args)",
"type": "go",
"request": "launch",
"mode": "debug",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/rad",
"args": "${input:cliArgs}",
"console": "integratedTerminal"
},
{
"name": "Launch Applications RP",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/applications-rp/main.go"
},
{
"name": "Launch Dynamic RP",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/dynamic-rp/main.go"
},
{
"name": "Launch UCP",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/ucpd/main.go"
},
{
"name": "Launch Controller",
"type": "go",
"request": "launch",
"mode": "auto",
"preLaunchTask": "Build Radius (all)",
"program": "${workspaceFolder}/cmd/controller/main.go",
"args": ["--cert-dir", ""]
},
{
"name": "Launch Deployment Engine",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Build Deployment Engine",
"program": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine/bin/Debug/net8.0/arm-de.dll",
"args": [],
"cwd": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine",
"stopAtEntry": false,
"env": {
"ASPNETCORE_URLS": "http://localhost:5017",
"ASPNETCORE_ENVIRONMENT": "Development",
"KUBERNETESBICEPEXTENSIBILITYURL": "http://localhost:5017/api",
"RADIUSBACKENDURI": "http://localhost:9000"
}
},
{
"name": "Debug Bicep generator integration tests",
"type": "node",
"request": "launch",
"runtimeArgs": [
"--inspect-brk",
"${workspaceRoot}/hack/bicep-types-radius/src/autorest.bicep/node_modules/.bin/jest",
"--runInBand",
"--no-cache"
],
"cwd": "${workspaceFolder}/hack/bicep-types-radius/src/autorest.bicep/src",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"sourceMaps": true
}
],
"compounds": [
{
"name": "Launch Control Plane (all)",
"configurations": [
"Launch UCP",
"Launch Applications RP",
"Launch Dynamic RP",
"Launch Controller",
"Launch Deployment Engine"
],
"stopAll": true
}
],
"inputs": [
{
"id": "cliArgs",
"type": "promptString",
"description": "Args for launching Radius cli. Use --cwd to set the working directory.",
"default": "init --full"
}
]
"version": "0.2.0",
"configurations": [
{ "name": "Attach UCP (dlv 40001)", "type": "go", "request": "attach", "mode": "remote", "port": 40001, "host": "127.0.0.1" },
{ "name": "Attach Controller (dlv 40002)", "type": "go", "request": "attach", "mode": "remote", "port": 40002, "host": "127.0.0.1" },
{ "name": "Attach Applications RP (dlv 40003)", "type": "go", "request": "attach", "mode": "remote", "port": 40003, "host": "127.0.0.1" },
{ "name": "Attach Dynamic RP (dlv 40004)", "type": "go", "request": "attach", "mode": "remote", "port": 40004, "host": "127.0.0.1" },
{ "name": "Launch UCP", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/ucpd/main.go", "env": { "BASE_PATH": "/apis/api.ucp.dev/v1alpha3", "PORT": "9000", "AWS_REGION": "us-east-1" }, "args": ["--config-file", "${workspaceFolder}/cmd/ucpd/ucp-dev.yaml"] },
{ "name": "Launch Controller", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/controller/main.go", "args": ["--config-file", "${workspaceFolder}/cmd/controller/controller.yaml"] },
{ "name": "Launch Applications RP", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/applications-rp/main.go", "args": ["--config-file", "${workspaceFolder}/cmd/applications-rp/applications-rp.yaml"] },
{ "name": "Launch Dynamic RP", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/dynamic-rp/main.go", "args": ["--config-file", "${workspaceFolder}/cmd/dynamic-rp/dynamic-rp.yaml"] },
{ "name": "Debug rad CLI", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/rad/main.go", "args": ["version"], "env": { "RADIUS_ENV": "self-hosted" } },
{ "name": "Debug rad CLI (prompt for args)", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/rad/main.go", "args": "${input:radArgs}", "env": { "RADIUS_ENV": "self-hosted" } },
{ "name": "Debug drad CLI (debug environment)", "type": "go", "request": "launch", "mode": "auto", "program": "${workspaceFolder}/cmd/rad/main.go", "args": "--config ${workspaceFolder}/build/configs/rad-debug-config.yaml ${input:radArgs}", "env": { "RADIUS_ENV": "self-hosted" } }
],
"compounds": [
{ "name": "Attach Radius (all)", "configurations": ["Attach UCP (dlv 40001)", "Attach Controller (dlv 40002)", "Attach Applications RP (dlv 40003)", "Attach Dynamic RP (dlv 40004)"], "stopAll": true },
{ "name": "Launch Control Plane (all)", "configurations": ["Launch UCP", "Launch Applications RP", "Launch Dynamic RP", "Launch Controller"], "stopAll": true }
],
"inputs": [
{ "id": "radArgs", "type": "promptString", "description": "Arguments for the rad command (e.g. 'env list')", "default": "version" }
]
}
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"go.gopath": "${env:GOPATH}",
"go.useLanguageServer": true,
"go.delveConfig": {
"apiVersion": 2,
"showGlobalVariables": true
},
"files.associations": {
"*.yaml": "yaml",
"*.yml": "yaml"
},
"terminal.integrated.env.linux": {
"RADIUS_DEV_ROOT": "${workspaceFolder}/debug_files"
},
"terminal.integrated.env.osx": {
"RADIUS_DEV_ROOT": "${workspaceFolder}/debug_files"
},
"terminal.integrated.env.windows": {
"RADIUS_DEV_ROOT": "${workspaceFolder}/debug_files"
},
"makefile.configureOnOpen": false
}
166 changes: 102 additions & 64 deletions .vscode/tasks.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Love it!

Original file line number Diff line number Diff line change
@@ -1,66 +1,104 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Check for Deployment Engine",
"detail": "Checks if the Deployment Engine is cloned as a sibling to the Radius repo",
"command": "bash",
"args": [
"-c",
"(test -d ../deployment-engine/src) || { echo >&1 \"The radius-project/deployment-engine is not cloned as a sibling to the Radius repo. Please clone the radius-project/deployment-engine repo next to the Radius repo.\"; exit 1; }"
],
"type": "shell",
"options": {
"cwd": "${workspaceFolder}"
},
"group": "none",
"presentation": {
"reveal": "silent",
"echo": false,
"clear": true
},
"problemMatcher": []
},
{
"label": "Build Deployment Engine",
"detail": "Builds the Deployment Engine. This requires the radius-project/deployment engine repo to be cloned as a sibling to the radius-project/radius repo",
"dependsOn": ["Check for Deployment Engine"],
"command": "dotnet build",
"type": "shell",
"options": {
"cwd": "${workspaceFolder}/../deployment-engine/src/DeploymentEngine"
},
"group": "build",
"presentation": {
"echo": true,
"reveal": "silent",
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"problemMatcher": "$msCompile"
},
{
"label": "Build Radius (all)",
"detail": "Builds the Radius repository using make build",
"command": "make",
"type": "shell",
"args": ["build"],
"options": {
"cwd": "${workspaceFolder}"
},
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": "$gcc",
"presentation": {
"echo": true,
"reveal": "silent",
"panel": "shared",
"showReuseMessage": false,
"clear": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "Debug: Start All Components",
"type": "shell",
"command": "make",
"args": ["debug-start"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
{
"label": "Debug: Stop All Components",
"type": "shell",
"command": "make",
"args": ["debug-stop"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
{
"label": "Debug: Component Status",
"type": "shell",
"command": "make",
"args": ["debug-status"],
"group": "test",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
{
"label": "Debug: View Logs",
"type": "shell",
"command": "make",
"args": ["debug-logs"],
"group": "test",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
{
"label": "Build All Components",
"type": "shell",
"command": "make",
"args": ["build"],
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
},
{
"label": "Build Debug Components",
"type": "shell",
"command": "make",
"args": ["debug-build"],
"group": "build",
"presentation": {
"echo": true,
"reveal": "always",
"focus": false,
"panel": "shared",
"showReuseMessage": true,
"clear": false
},
"problemMatcher": []
}
]
}
Loading
Loading