# Start Debug Tunnel

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Start Debug Tunnel"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/api/v2/workspaces/{workspace_id}/pipelines/{pipeline_id}/debug-tunnel"}
  context={"endpoint"}
>
  
</MethodEndpoint>

Start a debug tunnel for a pipeline.

If another debug tunnel is already running for this pipeline, the existing tunnel will be stopped and a new one will
be started.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"description":"Unique identifier of the pipeline you want to debug.","in":"path","name":"pipeline_id","required":true,"schema":{"description":"Unique identifier of the pipeline you want to debug.","format":"uuid","title":"Pipeline Id","type":"string"}},{"description":"Type the id of the workspace.","in":"path","name":"workspace_id","required":true,"schema":{"description":"Type the id of the workspace.","format":"uuid","title":"Workspace Id","type":"string"}}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"202":{"content":{"application/json":{"schema":{"additionalProperties":true,"properties":{"code":{"description":"Code to login to the debug tunnel device.","title":"Device login code","type":"string"},"url":{"description":"URL to login to the debug tunnel device.","title":"Device login URL","type":"string"},"vscode_url":{"description":"URL to redirect to VSCode.","title":"VSCode redirect URL","type":"string"}},"required":["url","code","vscode_url"],"title":"DebugTunnelDeviceLoginCredentials","type":"object"}}},"description":"Debug tunnel started."},"422":{"content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"ctx":{"title":"Context","type":"object"},"input":{"title":"Input"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Location","type":"array"},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}},"required":["loc","msg","type"],"title":"ValidationError","type":"object"},"title":"Detail","type":"array"}},"title":"HTTPValidationError","type":"object"}}},"description":"Validation Error"},"424":{"description":"Debug tunnel device login failed."}}}
>
  
</StatusCodes>
