debugar-advpl

debugar-advpl is a skill for Claude Code, Codex from Guipegoraro/tds-mcp. It costs 69 tokens per session (2,758 once invoked), scanned A, original, MIT.

A debugging and execution connection for AdvPL and TLPP programs on a TOTVS AppServer. It can attach to the server's debugger or run a user function through the SmartClient web interface.

In plain words
What is it for?
Use it to compile matching local source, set breakpoints, inspect execution, run a routine, or reproduce an error log.
Why use it?
It helps locate runtime errors by stopping at breakpoints and inspecting the call stack and variables, while requiring authorization for the actual server and environment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to compile matching local source, set breakpoints, inspect execution, run a routine, or reproduce an error log.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/guipegoraro/tds-mcp/debugar-advpl
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Guipegoraro/tds-mcp --skill debugar-advpl
Clone the repo
git clone --depth 1 https://github.com/Guipegoraro/tds-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for debugar-advpl

README.md
[![agentmods](https://agentmods.dev/badge/skills/guipegoraro/tds-mcp/debugar-advpl/github.svg)](https://agentmods.dev/skills/guipegoraro/tds-mcp/debugar-advpl)
Your own site
<a href="https://agentmods.dev/skills/guipegoraro/tds-mcp/debugar-advpl"><img src="https://agentmods.dev/badge/skills/guipegoraro/tds-mcp/debugar-advpl/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for debugar-advpl

Your own site · 80×15
<a href="https://agentmods.dev/skills/guipegoraro/tds-mcp/debugar-advpl"><img src="https://agentmods.dev/badge/skills/guipegoraro/tds-mcp/debugar-advpl.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,758 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.02758
Opus 5.5 $0.00028 $0.01103
Sonnet 5.5 $0.00014 $0.00552
Haiku 4.5 $0.00007 $0.00276

Measured today against content hash 83daa52c2ca7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debugar-advpl scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/debugar-advpl/SKILL.md · 152 lines

How it starts

The opening of the file, as written. The whole thing — 152 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Depurar AdvPL/TLPP

As tools tds_debug_* e tds_run ligam o depurador da TOTVS ao AppServer conectado e rodam o programa no SmartClient HTML (webapp). As descrições das tools são a fonte do que cada parâmetro e campo de retorno significa; aqui está o processo. Modo navegador, módulo, headless, REST/jobs, temporários e problemas comuns: REFERENCE.md.

Dois vocabulários de resultado:

  • tds_run devolve resultado: concluido, erro (mensagem, fonte/linha, pilha) ou tempoEsgotado (vêm tela e botoes; a execução é encerrada).
  • tds_debug_start/wait/step devolvem estado: parado (local, pilha, variáveis), executando (não parou no prazo; headless traz tela e botoes, navegador traz conectado) ou encerrado (programa terminou; erro em erroDeExecucao ou mensagem de nível ERROR).

Arquivo que o programa manda ao navegador (PDF, CpyS2TW) vem em arquivosBaixados, com o caminho local, nos modos headless e job sem WebAgent; com o agente ligado, o PDF abre no visualizador da máquina e não volta (REFERENCE.md, "TOTVS WebAgent").

Passos

  1. Licença. Pergunte ao usuário: "Posso executar/depurar <programa> em <servidor>/<ambiente>?" e, se for compilar algo (passo 3), cite os fontes na mesma pergunta. O programa roda de verdade, grava o que gravar, e parado num breakpoint segura a thread no servidor; compilar troca no RPO a versão que estiver lá (num ambiente compartilhado, a de um colega). Ambiente de produção: confirme de novo, à parte, antes de executar ou compilar. A licença vale para aquele servidor nesta conversa. Concluído quando: o usuário autorizou servidor, ambiente e o que será compilado.

  2. Caminho. Escolha pelo que a rotina precisa:

    • Saber se roda ou qual erro dá, sem tela, sem empresa e em até ~100 s: tds_run com timeoutSeg adequado (padrão 60; no tempo esgotado a execução é interrompida no meio). A função roda sem empresa aberta (sem xFilial, SX, MV_). O tds_run não devolve o valor de retorno: para ver o que a função devolve, use o wrapper com rastro no Return (REFERENCE.md, "Wrapper de teste").
    • Rotina sem tela, ou processamento que pode passar de 100 s: tds_debug_start modo headless, repetindo tds_debug_wait (também sem empresa aberta).
    • Rotina que usa o ambiente do usuário (empresa e filial, Pergunte, MV_) ou tem tela: modo navegador com modulo e a rotina em programa. Sem o módulo no pedido, pergunte ao usuário em qual módulo a rotina roda. Você faz o login e confirma as telas de entrada no chrome-devtools (REFERENCE.md, "Rotina dentro do módulo").
    • Rotina com parâmetro numérico, lógico ou data (argumentos chegam sempre como caractere e não combinam com modulo), com parâmetro e ambiente ao mesmo tempo, chamada por StartJob/agendamento, ou cujo arquivo gerado (PDF) você precisa conferir: wrapper que monta o cenário e chama a rotina, com nome = prefixoWrapper (devolvido por tds_use_server, único por pessoa e máquina) + 3 letras da rotina, ex.: U_zTK3FRel (no mesmo RPO outro desenvolvedor pode ter o dele), rodado com tds_run ou no modo headless (o arquivo volta em arquivosBaixados) e compilado como temporário (REFERENCE.md, "Wrapper de teste"). Empresa, filial e respostas de pergunta (MV_PARxx) vêm do usuário; sem elas, pergunte. Função que já recebe empresa e filial e abre o próprio ambiente roda direto, com elas em argumentos.
    • Rotina que depende do TOTVS WebAgent (arquivo na máquina do usuário, Excel, porta serial/balança, GetRemoteType() 1): o modo navegador já o liga (abra a página como diz o proximoPasso, com o initScript); nos outros, webAgent: true (REFERENCE.md, "TOTVS WebAgent").
    • O caminho HTTP de um REST, ou a thread exata que o StartJob cria: modo job, só quando o usuário confirmar que o AppServer é exclusivo dele (nenhum outro desenvolvedor ou usuário conectado; "é o de desenvolvimento" não basta) e quem ajusta o appserver.ini (REFERENCE.md, "REST e jobs").
    • Pedido com arquivo e linha, sem dizer que rotina executa aquele trecho: pergunte a rotina ou o menu de entrada; o programa é o ponto de entrada, não a função que contém a linha. Concluído quando: o caminho escolhido cobre o que a rotina precisa de ambiente e de parâmetro.

Read the full file on GitHub · 152 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today Changed · +2 lines 83daa52c2ca7
  2. yesterday Changed · +84 lines · +2 tokens per session c6ad0467bdb5
  3. 4d ago First seen · 66 lines · 67 tokens per session scan A 748f2c6eda85

Subscribe to this mod's changes

debugar-advpl is a skill published in the GitHub repository Guipegoraro/tds-mcp (2 stars, last pushed yesterday), licensed MIT. It adds 69 tokens to every session and 2,758 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-03.

Related

Other skills, from other repositories

advpl-debugging

Use when the user asks to debug, diagnose, or fix an ADVPL/TLPP error on TOTVS Protheus -- compilation errors (syntax, missing includes, undeclared variables), runtime failures (NIL access, type mismatch, array bounds), performance issues (slow queries, memory leaks), database locks (RecLock timeouts, deadlocks), or…

thalysjuvenal/advpl-specialist · 142 tokens

protheus-locks-deadlocks

Use when the user needs to understand, diagnose, or prevent Protheus record locks and deadlocks -- covering RecLock/MsUnlock/SoftLock/LockByName semantics, BeginTran/EndTran transaction scoping, lock leak and deadlock diagnostics (TopMemoStatus, MonitorActiveLocks, DBAccess monitor, SQL Server/PostgreSQL/Oracle lock…

thalysjuvenal/advpl-specialist · 147 tokens

advpl-dev

Especialista em desenvolvimento ADVPL/TLPP para o ecossistema TOTVS Protheus. Use esta skill para auxiliar com: escrita e revisão de código ADVPL e TLPP, criação de pontos de entrada (convencional e MVC), desenvolvimento de APIs REST, consultas SQL/Embedded SQL, acesso a tabelas do Protheus, criação de classes OO…

jaylson/claude-skill-advpl · 211 tokens

report-issue-local

File a bug or feature request against this MCP server's own repo. Use for server-specific issues — tool logic, service integrations, config problems, or domain bugs that aren't caused by the framework.

cyanheads/obsidian-mcp-server · 44 tokens

opik-diagnose

Surface the Opik traces worth a developer's attention, ranked by signal — Diagnostics issues first, then errors, failed tool calls, latency, regressions, and low online-eval scores. With the Opik MCP connected it lists the project's agentinsightsissue entities, offers to turn Diagnostics on when the project has it…

comet-ml/opik-mcp · 187 tokens

opik-explain

Root-cause a specific Opik trace, or a pattern across traces, and return a grounded explanation. Uses the hosted Opik MCP when it is connected, and falls back to SDK scripting otherwise. Returns the root cause, the evidence spans as clickable Opik UI links, and one suggested next step. Use for "why did this trace…

comet-ml/opik-mcp · 113 tokens