Skip to main content

b2c-mcp-debugger

Debug B2C Commerce server-side scripts with the MCP debugger tools, using bounded breakpoint capture, request triggering, state inspection, and reliable session cleanup.

Quellinformationen

Repository
SalesforceCommerceCloud/b2c-developer-tooling
Letzte Quellaktivität
19. Oktober 2026 um 16:33
Erkannte Sprache von SKILL.md
Englisch
Sterne
56
Forks
24

Installationsoptionen

Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.

Quelldateien prüfen

Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.

SKILL.md wird angezeigt

SKILL.md
Quellanweisungen · Schreibgeschützte Vorschau
name
b2c-mcp-debugger
description
Debug B2C Commerce server-side scripts with the MCP debugger tools, using bounded breakpoint capture, request triggering, state inspection, and reliable session cleanup.
# MCP Debugger Usage Use for B2C server-side script debugging. Confirm the sandbox, deployed script, breakpoint, and request before starting a session. ## Prerequisites - Basic Auth for a BM user with `WebDAV_Manage_Customization`: username plus password or WebDAV File Access and UX Studio access key. OAuth is unsupported. - Inspect unknown connection settings with `config_inspect` and the task's `projectDirectory`; keep its default masking. Use resolved values. - Match local source and line numbers to deployed code and the site's cartridge path. A breakpoint's `verified` flag indicates local source mapping, not that matching code is deployed or active. ## Capture and cleanup 1. Call `debug_start_session` with `projectDirectory`. Use `configPath` or `instanceName` only to override the configured selection. Cartridge discovery defaults to that project; use `cartridgeDirectory` only for a different root. Preserve the returned session ID and `resolution`. 2. Call `debug_capture_at_breakpoint` with the file, line, a bounded timeout, and `auto_continue: true` for a snapshot. It arms its own breakpoint; a prior `debug_set_breakpoints` call is unnecessary. Use that tool for separate breakpoint management; it replaces the existing set. 3. Trigger the request. The capture tool's optional trigger supports GET without custom headers; trigger authenticated or non-GET requests externally. An external trigger must run while capture waits, not after awaiting its result. A halted capture can return `trigger_pending: true`; resume with `debug_control` with `action: continue` before expecting that request to finish. Do not retrigger it. 4. Use captured stack, variables, and expressions. Capture returns local and closure variables; pass `scopes` to add globals or `[]` to omit variables when expressions cover what you need. For further halted inspection, use `debug_inspect` or `debug_evaluate`. Inspection returns stack and top-frame variables (all scopes) by default; `include` selects stack, variables, or both. Use `frame_index`, `scope`, or `object_path` for targeted inspection. Expressions can have side effects; keep evaluation within the requested scope. 5. Check halted threads with `debug_list_sessions`, resume with `debug_control` with `action: continue`, and always call `debug_end_session` with `clear_breakpoints: true`, including after errors or timeouts. Stop any log watches started for the investigation. ## Stepping After a halt, call `debug_control` with `action: into`, `over`, or `out`, then `debug_wait_for_stop` before inspecting again. `action: continue` runs until the next breakpoint or request completion. End sessions explicitly. ## Recovery - No breakpoint hit: verify deployed code, cartridge path, request, and breakpoint. A timeout leaves the breakpoint armed. Check sessions for a late halt; end with `clear_breakpoints: true` when finished. Do not leave an unbounded capture waiting. - Configuration still unexplained after `config_inspect`: consult [MCP configuration](skill://mcp/b2c-mcp-config/SKILL.md). - Missing BM permission/access key: `docs_read({query: "mcp-security"})` for debugger requirements; `guide-authentication` for WebDAV key setup. For other setup issues, `docs_search` with the specific error. If docs tools are unavailable, use [debugger access](https://salesforcecommercecloud.github.io/b2c-developer-tooling/mcp/security.md#debugger) and [WebDAV key setup](https://salesforcecommercecloud.github.io/b2c-developer-tooling/guide/authentication.md#webdav-access). General WebDAV OAuth instructions do not apply to the debugger. - Before repeating a failed request, check whether it already changed state. ## CLI or IDE, when requested For terminal debugging use `b2c debug cli`; for a DAP client use `b2c debug`. For those workflows, read [b2c-cli/b2c-debug](skill://b2c-cli/b2c-debug/SKILL.md) or the CLI debugger reference (`docs_read({query: "cli-debug"})`, [online](https://salesforcecommercecloud.github.io/b2c-developer-tooling/cli/debug.md)). Other MCP workflows and runbooks: [skill index](skill://mcp/b2c-mcp-server/SKILL.md#skill-index).
Auf GitHub ansehen