File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
src/agentex/lib/cli/debug Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change 77 "request" : " attach" ,
88 "connect" : {
99 "host" : " localhost" ,
10- "port" : 5678 // change this if your debug server is running on a different port
10+ "port" : 5678
11+ },
12+ "pathMappings" : [
13+ {
14+ "localRoot" : " ${workspaceFolder}" ,
15+ "remoteRoot" : " ."
16+ }
17+ ],
18+ "justMyCode" : false ,
19+ "console" : " integratedTerminal"
20+ },
21+ {
22+ "name" : " Attach to AgentEx Worker (Port 5679)" ,
23+ "type" : " debugpy" ,
24+ "request" : " attach" ,
25+ "connect" : {
26+ "host" : " localhost" ,
27+ "port" : 5679
1128 },
1229 "pathMappings" : [
1330 {
Original file line number Diff line number Diff line change @@ -44,7 +44,9 @@ async def start_temporal_worker_debug(
4444 })
4545
4646 # Start the worker process
47- cmd = [sys .executable , "-m" , "run_worker" ]
47+ # For debugging, use absolute path to run_worker.py to run from workspace root
48+ worker_script = worker_path .parent / "run_worker.py"
49+ cmd = [sys .executable , str (worker_script )]
4850
4951 console .print (f"[blue]🐛 Starting Temporal worker in debug mode[/blue]" )
5052 console .print (f"[yellow]📡 Debug server will listen on port { debug_port } [/yellow]" )
@@ -58,7 +60,7 @@ async def start_temporal_worker_debug(
5860
5961 return await asyncio .create_subprocess_exec (
6062 * cmd ,
61- cwd = worker_path . parent ,
63+ cwd = Path . cwd (), # Run from current working directory (workspace root)
6264 env = debug_env ,
6365 stdout = asyncio .subprocess .PIPE ,
6466 stderr = asyncio .subprocess .STDOUT ,
You can’t perform that action at this time.
0 commit comments