refactor: change debugger port from 5679 to 3003

Updates the debugger service to use port 3003 instead of 5679 across
all configuration files, documentation, and code references. This aligns
the debugger with the other windmill-extra services which use ports
3001 (LSP) and 3002 (Multiplayer).

Changes:
- docker-compose.yml: Update port exposure and add DEBUGGER_PORT env
- docker/entrypoint-extra.sh: Change default port from 5679 to 3003
- debugger/dap_debug_service.ts: Update default port in code and docs
- debugger/README.md: Update port documentation
- debugger/test_debug_service.ts: Update test URLs
- docker/test_windmill_extra.ts: Update test configuration
- .github/workflows/publish_extra.yml: Update test container ports
- frontend/src/lib/components/debug/*: Update frontend examples and defaults

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-01-13 17:56:32 +00:00
parent 1e262522dd
commit f8cbf15d86
10 changed files with 22 additions and 20 deletions

View File

@@ -50,10 +50,11 @@ jobs:
- name: Start container
run: |
docker run -d --name windmill-extra-test \
-p 3001:3001 -p 3002:3002 -p 5679:5679 \
-p 3001:3001 -p 3002:3002 -p 3003:3003 \
-e ENABLE_LSP=true \
-e ENABLE_MULTIPLAYER=true \
-e ENABLE_DEBUGGER=true \
-e DEBUGGER_PORT=3003 \
-e REQUIRE_SIGNED_DEBUG_REQUESTS=false \
windmill-extra:test

View File

@@ -18,10 +18,10 @@
# Uncomment and set ENABLE_MULTIPLAYER=true in docker-compose.yml
# reverse_proxy /ws_mp/* http://windmill_extra:3002
# Debugger - Interactive debugging via DAP WebSocket (windmill_extra:5679)
# Debugger - Interactive debugging via DAP WebSocket (windmill_extra:3003)
# Set ENABLE_DEBUGGER=true in docker-compose.yml to enable
handle_path /ws_debug/* {
reverse_proxy http://windmill_extra:5679
reverse_proxy http://windmill_extra:3003
}
# Search indexer, Enterprise Edition (windmill_indexer:8002)

View File

@@ -49,7 +49,7 @@ bun run debug/dap_debug_service.ts
```
Options:
- `--port PORT` - Server port (default: 5679)
- `--port PORT` - Server port (default: 3003)
- `--host HOST` - Server host (default: 0.0.0.0)
- `--python-path PATH` - Python binary path (default: python3)
- `--bun-path PATH` - Bun binary path (default: bun)
@@ -67,7 +67,7 @@ Options:
| Variable | Description | Default |
|----------|-------------|---------|
| `DAP_PORT` | Server port | 5679 |
| `DAP_PORT` | Server port | 3003 |
| `DAP_HOST` | Server host | 0.0.0.0 |
| `DAP_PYTHON_PATH` | Python binary path | python3 |
| `DAP_BUN_PATH` | Bun binary path | bun |

View File

@@ -16,7 +16,7 @@
* bun run dap_debug_service.ts [options]
*
* Options:
* --port PORT Server port (default: 5679)
* --port PORT Server port (default: 3003)
* --host HOST Server host (default: 0.0.0.0)
* --nsjail Enable nsjail wrapping
* --nsjail-config PATH Path to nsjail config file
@@ -68,7 +68,7 @@ interface ServiceConfig {
function parseConfig(): ServiceConfig {
const args = process.argv.slice(2)
const config: ServiceConfig = {
port: parseInt(process.env.DAP_PORT || '5679', 10),
port: parseInt(process.env.DAP_PORT || '3003', 10),
host: process.env.DAP_HOST || '0.0.0.0',
nsjail: {
enabled: process.env.DAP_NSJAIL_ENABLED === 'true',

View File

@@ -21,7 +21,7 @@
import { spawn } from 'bun'
const SERVICE_URL = 'ws://localhost:5679'
const SERVICE_URL = 'ws://localhost:3003'
const TEST_NSJAIL = process.argv.includes('--nsjail')
const TEST_AUTOINSTALL = process.argv.includes('--test-autoinstall')
@@ -810,7 +810,7 @@ async function testHealthEndpoint(): Promise<boolean> {
console.log('\n=== Testing Health Endpoint ===')
try {
const response = await fetch(`http://localhost:5679/health`)
const response = await fetch(`http://localhost:3003/health`)
const data = await response.json()
console.log(` Health response: ${JSON.stringify(data)}`)

View File

@@ -180,11 +180,12 @@ services:
expose:
- 3001 # LSP
- 3002 # Multiplayer
- 5679 # Debugger
- 3003 # Debugger
environment:
- ENABLE_LSP=true
- ENABLE_MULTIPLAYER=false # Set to true to enable multiplayer (Enterprise Edition)
- ENABLE_DEBUGGER=true # Set to true to enable debugger
- DEBUGGER_PORT=3003 # Debugger service port
- ENABLE_NSJAIL=false # Set to true for nsjail sandboxing (requires privileged: true)
- REQUIRE_SIGNED_DEBUG_REQUESTS=false # Set to true to require JWT tokens for debug sessions
- WINDMILL_BASE_URL=http://windmill_server:8000

View File

@@ -64,11 +64,11 @@ fi
# Start Debugger service
if [ "${ENABLE_DEBUGGER:-true}" = "true" ]; then
echo "[entrypoint] Starting Debugger on port ${DEBUGGER_PORT:-5679}..."
echo "[entrypoint] Starting Debugger on port ${DEBUGGER_PORT:-3003}..."
cd /debugger
# Build debugger arguments
DEBUGGER_ARGS="--host ${HOST:-0.0.0.0} --port ${DEBUGGER_PORT:-5679}"
DEBUGGER_ARGS="--host ${HOST:-0.0.0.0} --port ${DEBUGGER_PORT:-3003}"
DEBUGGER_ARGS="$DEBUGGER_ARGS --windmill /usr/local/bin/windmill"
# Enable nsjail if requested

View File

@@ -5,20 +5,20 @@
* Tests all three services:
* - LSP (Language Server Protocol) - Port 3001
* - Multiplayer (y-websocket) - Port 3002
* - Debugger (DAP WebSocket) - Port 5679
* - Debugger (DAP WebSocket) - Port 3003
*
* Configuration via environment variables:
* - WINDMILL_EXTRA_HOST: Container hostname (default: localhost)
* - LSP_PORT: LSP service port (default: 3001)
* - MULTIPLAYER_PORT: Multiplayer service port (default: 3002)
* - DEBUGGER_PORT: Debugger service port (default: 5679)
* - DEBUGGER_PORT: Debugger service port (default: 3003)
* - SKIP_LSP: Skip LSP tests (default: false)
* - SKIP_MULTIPLAYER: Skip Multiplayer tests (default: false)
* - SKIP_DEBUGGER: Skip Debugger tests (default: false)
*
* Usage:
* # Start the container first
* docker run -p 3001:3001 -p 3002:3002 -p 5679:5679 \
* docker run -p 3001:3001 -p 3002:3002 -p 3003:3003 \
* -e ENABLE_LSP=true -e ENABLE_MULTIPLAYER=true -e ENABLE_DEBUGGER=true \
* windmill-extra
*
@@ -33,7 +33,7 @@
const HOST = process.env.WINDMILL_EXTRA_HOST || 'localhost'
const LSP_PORT = parseInt(process.env.LSP_PORT || '3001')
const MULTIPLAYER_PORT = parseInt(process.env.MULTIPLAYER_PORT || '3002')
const DEBUGGER_PORT = parseInt(process.env.DEBUGGER_PORT || '5679')
const DEBUGGER_PORT = parseInt(process.env.DEBUGGER_PORT || '3003')
const SKIP_LSP = process.env.SKIP_LSP === 'true'
const SKIP_MULTIPLAYER = process.env.SKIP_MULTIPLAYER === 'true'
const SKIP_DEBUGGER = process.env.SKIP_DEBUGGER === 'true'
@@ -616,7 +616,7 @@ async function main() {
} catch (error) {
console.error(`\n✗ ${error instanceof Error ? error.message : error}`)
console.error('\nMake sure the windmill-extra container is running:')
console.error(' docker run -p 3001:3001 -p 3002:3002 -p 5679:5679 \\')
console.error(' docker run -p 3001:3001 -p 3002:3002 -p 3003:3003 \\')
console.error(' -e ENABLE_LSP=true -e ENABLE_MULTIPLAYER=true -e ENABLE_DEBUGGER=true \\')
console.error(' windmill-extra')
process.exit(1)

View File

@@ -91,7 +91,7 @@ export class DAPClient {
> = new Map()
private url: string
constructor(url: string = 'ws://localhost:5679') {
constructor(url: string = 'ws://localhost:3003') {
this.url = url
}

View File

@@ -34,7 +34,7 @@
* <MonacoDebugger
* {editor}
* {code}
* dapServerUrl="ws://localhost:5679/typescript"
* dapServerUrl="ws://localhost:3003/typescript"
* filePath="/tmp/script.ts"
* />
* ```
@@ -94,7 +94,7 @@ export function getDebugServerUrl(language: DebugLanguage): string {
const path = DAP_ENDPOINT_PATHS[language] || DAP_ENDPOINT_PATHS.python3
if (typeof window === 'undefined') {
// SSR fallback
return `ws://localhost:5679${path}`
return `ws://localhost:3003${path}`
}
const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
return `${wsProtocol}://${window.location.host}/ws_debug${path}`