---
name: ADVPL Debugging
slug: advpl-debugging
category: Quality
description: ADVPL Debugging helps diagnose and fix ADVPL/TLPP errors in TOTVS Protheus, including compilation failures, runtime exceptions, locks, slow routines, and AppServer log analysis. Use it when you have an error message, stack trace, or failing routine to investigate.
github: "https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-debugging"
language: Shell
stars: 186
forks: 37
install: "npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-debugging ~/.claude/skills/advpl-debugging"
installs_to: ~/.claude/skills/advpl-debugging
source_path: skills/advpl-debugging/SKILL.md
collection_size: 18
category_size: 1745
collection_url: "https://dirskills.com/collections/thalysjuvenal/advpl-specialist"
added: 2026-09-06T05:20:27.203Z
last_synced: 2026-09-06T05:20:27.203Z
canonical_url: "https://dirskills.com/skills/advpl-debugging"
---

# ADVPL Debugging

ADVPL Debugging helps diagnose and fix ADVPL/TLPP errors in TOTVS Protheus, including compilation failures, runtime exceptions, locks, slow routines, and AppServer log analysis. Use it when you have an error message, stack trace, or failing routine to investigate.

**Install:**

```bash
npx degit https://github.com/thalysjuvenal/advpl-specialist/tree/main/skills/advpl-debugging ~/.claude/skills/advpl-debugging
```

## README

# ADVPL/TLPP Debugging

This skill provides a systematic methodology for diagnosing and resolving ADVPL/TLPP errors: a decision flow (compilation vs. runtime), a quick-diagnosis table by symptom, logging tool guidance (`Conout`, `FWLogMsg`, `ErrorBlock`), database lock diagnosis (`RecLock`/`MsUnlock`), and quick performance checks (wrong index, array growth in loops, Embedded SQL vs ISAM).

Activate this skill when the user reports an error message, a stack trace, a compilation failure, a hanging/locked record, a slow routine, or an AppServer crash/log to investigate. It does not cover generating new code from scratch (see `advpl-code-generation`), a general quality audit of working code (see `advpl-code-review`), restructuring code that already works correctly (see `advpl-refactoring`), or converting `.prw` to `.tlpp` (see `advpl-to-tlpp-migration`).

| Reference file | Read when |
|---|---|
| reference.md | Always -- debug methodology flow, quick diagnosis by symptom, logging tools, lock diagnosis, performance quick checks, common debugging mistakes |
| common-errors.md | Looking up a specific compilation or runtime error message (top 50 ADVPL/TLPP errors with cause and fix) |
| performance-tips.md | Investigating a performance bottleneck in depth (query optimization, loop efficiency, memory) |
