UiPath Documentation
uipath-cli
latest
false
UiPath-CLI-Benutzerhandbuch
Wichtig :
Dieser Inhalt wurde maschinell übersetzt. Es kann 1–2 Wochen dauern, bis die Lokalisierung neu veröffentlichter Inhalte verfügbar ist.

UIP-Agent-Debugging

Führen Sie einen Low-Code-Agent für Studio Web mit Beispieleingaben aus und streamen Sie das Ergebnis mit „uip agent debug“.

uip agent debug führt einen End-to-End-Low-Code-Agent für Studio Web mit den von Ihnen bereitgestellten Eingaben aus, bis die Ausführung abgeschlossen ist und sich der Status ändert. Anmeldung erforderlich

Das Projekt muss ein project.uiproj -Manifest verwenden – ein Projekt, das sich noch auf dem älteren project.json -Layout befindet, schlägt schnell mit Konvertierungsanweisungen fehl (Paketbefehle wie uip solution pack/publish akzeptieren immer noch project.json; nur Studio-Web-gebundene Befehle wie für dieses ist das neuere Manifest erforderlich).

Zusammenfassung​

uip agent debug <project-path> [-i <json>] [--attachment <field=path>]... [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]
uip agent debug <project-path> [-i <json>] [--attachment <field=path>]... [--poll-interval <ms>] [--timeout <seconds>] [--login-validity <minutes>]

Alle Aufrufe berücksichtigen die globalen Optionen (--output, --output-filter, --log-level, --log-file). Austrittscodes folgen dem Standardvertrag.

Argumente​

  • <project-path> (erforderlich) – Der Pfad zum Agent-Projektverzeichnis (enthält agent.json).

Optionen​

MarkierenStandardZweck
-i, --inputs <json>{}Input arguments as a JSON object, e.g. '{"input":"hello"}'. Must parse as a plain object. For a job-attachment field, pass an existing Orchestrator attachment reference, {"ID": "<attachment-id>"}, or use --attachment to upload a local file.
--attachment <field=path>–Upload a local file into a job-attachment input field of agent.json. Repeatable. The field must be declared as {"$ref": "#/definitions/job-attachment"} in inputSchema. Repeat the same field only when its schema is an array of job-attachments. The path resolves from the current working directory, not from the agent project directory. Uploaded attachment IDs are returned in Data.Attachments.
--poll-interval <ms>2000Abrufintervall in Millisekunden.
--timeout <seconds>600 Sekunden (10 Minuten)Maximale Sekunden, die gewartet werden soll, bis die Ausführung abgeschlossen ist.
--login-validity <minutes>10Die verbleibenden Minuten vor dem Ablauf des Tokens sind erforderlich, um fortzufahren.

Beispiele​

uip agent debug ./my-agent -i '{"input":"hello"}'

uip agent debug ./my-agent --timeout 120 --poll-interval 5000

# Upload a local PDF into the job-attachment input field fileIn
uip agent debug ./my-agent --attachment fileIn=./invoice.pdf -i '{"question":"What is the total?"}'
uip agent debug ./my-agent -i '{"input":"hello"}'

uip agent debug ./my-agent --timeout 120 --poll-interval 5000

# Upload a local PDF into the job-attachment input field fileIn
uip agent debug ./my-agent --attachment fileIn=./invoice.pdf -i '{"question":"What is the total?"}'

An --attachment value for a field also present in --inputs overrides the --inputs value, and the command logs a warning. A required job-attachment input that has neither an --attachment nor an --inputs value also produces a warning.

Datenform (--output json)​

Erfolg (Code: "AgentDebug"):

{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "content": "hi there" }
  },
  "Instructions": "Debug run completed: Successful"
}
{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "content": "hi there" }
  },
  "Instructions": "Debug run completed: Successful"
}

Output ist nur vorhanden, wenn die Ausführung eines erzeugt hat; Info ist nur vorhanden, wenn der Dienst zusätzliche Diagnoseinformationen zurückgegeben hat.

When the run uploads files with --attachment, Data.Attachments lists each upload:

{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "answer": "1,234.00 USD" },
    "Attachments": [
      {
        "Field": "fileIn",
        "AttachmentId": "c3d4e5f6-0000-0000-0000-000000000002",
        "FileName": "invoice.pdf",
        "MimeType": "application/pdf",
        "Size": 48213
      }
    ]
  }
}
{
  "Code": "AgentDebug",
  "Data": {
    "JobKey": "a1b2c3d4-0000-0000-0000-000000000401",
    "TraceId": "b2c3d4e5-0000-0000-0000-000000000001",
    "State": "Successful",
    "Output": { "answer": "1,234.00 USD" },
    "Attachments": [
      {
        "Field": "fileIn",
        "AttachmentId": "c3d4e5f6-0000-0000-0000-000000000002",
        "FileName": "invoice.pdf",
        "MimeType": "application/pdf",
        "Size": 48213
      }
    ]
  }
}

To reuse an uploaded file in a later run without uploading it again, pass its reference in --inputs, for example '{"fileIn":{"ID":"c3d4e5f6-0000-0000-0000-000000000002"}}'.

Attachment errors — an invalid --attachment value (wrong field=path format, a field that is not a job-attachment input, a missing, empty, or directory path) fails before anything is uploaded or run, with Retry: "RetryWillNotFix". When Orchestrator refuses an upload, no debug job starts.

Nicht erfolgreicher Endstatus – derselbe Code: "AgentDebug", wird aber als Fehler zurückgegeben (Exitcode 1), wobei Message: "Debug run <state>." und Instructions auf uip traces spans get <TraceId> verweisen, um die Ausführung zu überprüfen.

Inkompatibles Projektmanifest:

{
  "Result": "Failure",
  "ErrorCode": "invalid_argument",
  "Message": "...",
  "Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
{
  "Result": "Failure",
  "ErrorCode": "invalid_argument",
  "Message": "...",
  "Instructions": "Convert the listed project(s) to a project.uiproj manifest before debugging: scaffold the accepted layout with 'uip api-workflow init <name>' inside the solution and move Workflow.json (plus entry-points.json and bindings_v2.json) into it, then remove the project.json-based entry from the .uipx. Note that 'uip solution pack' and 'uip solution publish' accept project.json — only Studio Web-bound commands require project.uiproj."
}
  • uip agent validate – Zuerst ausführen, um zu bestätigen, dass das Projekt gut formatiert ist; vorgeschlagen in Anweisungen zum Hochladen.
  • uip traces spans get – überprüft die Ablaufverfolgung einer Debug-Ausführung nach einem nicht erfolgreichen Status.

Siehe auch​

War diese Seite hilfreich?

Verbinden

Benötigen Sie Hilfe? Support(opens in new window)

Möchten Sie lernen? UiPath Academy(opens in new window)

Haben Sie Fragen? UiPath-Forum(opens in new window)

Auf dem neuesten Stand bleiben