-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Common issues and their solutions.
Symptom: The Testing view is empty, no suites listed.
Likely cause: utplsql.includePatterns does not cover your test files.
Solution: Adjust the glob pattern. Examples:
Use utPLSQL: Refresh Tests (palette) to force rediscovery.
For automatic diagnostics, run utPLSQL: Validate Configuration.
Symptom: Tests fail with a compilation error, but the editor does not show squiggly underlines.
Cause 1: utplsql.compilationDiagnostics.enabled is false (default is true).
Cause 2: Diagnostics are published after a test run, and only for packages discovered in the workspace (best-effort) — nothing appears before the first run.
Solution: Enable utplsql.compilationDiagnostics.enabled and run the tests.
Errors from ALL_ERRORS are then mapped to the suite files and shown as
underlines in the editor and in the Problems Panel (source "utPLSQL Compilation").
Symptom: Tests pass, but coverage shows 0% across all files.
Cause 1: Missing GRANT EXECUTE ON DBMS_PROFILER.
Solution: Run as DBA:
GRANT EXECUTE ON SYS.DBMS_PROFILER TO <schema>;
GRANT EXECUTE ON SYS.DBMS_PLSQL_CODE_COVERAGE TO <schema>;Cause 2: The UT_COVERAGE_COBERTURA_REPORTER reporter does not exist in the
database (outdated utPLSQL).
Solution: Update utPLSQL on the database. Use utPLSQL: Show Information
to verify the version.
Cause 3: sourcePath points to the wrong folder, or the
sourcePath/<type>/<name>.sql layout does not match the covered objects.
Solution: Adjust utplsql.sourcePath and the folder layout
(functions/, procedures/, packages/, views/, ...). There is no
per-object log: when nothing is mapped, the run output shows the generic
message [coverage] no file mapped.
Symptom: Execution is interrupted before completing, with a timeout message.
Cause: Tests take longer than utplsql.timeoutMinutes (default 60 min).
Solution: Increase the timeout:
"utplsql.timeoutMinutes": 120Symptom: "Connection failed", "ORA-12154", or "Could not resolve service name".
Cause: Malformed connection string, database unreachable, or TNS not configured.
Solution:
- Use
utPLSQL: Show Informationto validate the connection directly - Check the format:
- EZ Connect:
user/pass@//host:port/service(note the double slash) - TNS:
user/pass@tns_alias(resolved fromutplsql.connections.tnsAdminPath, the SQL Developer TNS path, orTNS_ADMIN)
- EZ Connect:
- Test connectivity with
tnspingorsqlplus
Symptom: accents or symbols arrive mangled in the database after
utPLSQL: Run script file / utPLSQL: Run script folder.
Cause: the file was decoded with the wrong encoding. The Oracle driver in
thin mode always uses AL32UTF8 on the connection — the profile charset only
controls how the file is read before sending.
Solution:
- Check the file's real encoding and set the profile
charset(utf8|latin1|win1252, defaultutf8) - The "utPLSQL Script" OutputChannel logs the charset used in the header
(e.g.
seed.sql (win1252)) — use it to diagnose - There is no encoding auto-detection (unreliable): mark the correct charset on the profile
- Note:
latin1(true ISO-8859-1) ≠win1252for bytes0x80–0x9F(e.g.€only exists inwin1252) -
Legacy database character set: the
node-oracledbthin driver always usesAL32UTF8and ignoresNLS_LANG; the server converts. On a database with a legacy charset (e.g. 12.2WE8DEC), non-representable characters (€) are lost (¿) and the extension cannot fix it — configure the database withAL32UTF8(PRD-84).
Symptom: The package exists but does not appear as a suite in the Test Explorer.
Likely causes: The file does not have %suite and the create [or replace] package
declaration (both are required by the parser); or no %test is associated with a procedure.
The parser is token-driven — there is no blank-line requirement:
create or replace package test_foo as
-- %suite(Foo)
-- %test(bar)
procedure bar;
end;Also verify that the file is covered by utplsql.includePatterns and run
utPLSQL: Refresh Tests.
Symptom: Run/Run with Coverage buttons do not appear above %suite and
%test in .pks files.
Cause 1: utplsql.codeLens.enabled is disabled.
Solution: Check in settings.json:
"utplsql.codeLens.enabled": true // default is trueCause 2: editor.codeLens is disabled in VS Code.
Solution: Enable it:
"editor.codeLens": trueSymptom: Shortcuts with the Ctrl+Shift+U prefix do not perform the
expected action, or they trigger a command from another extension.
Cause: Conflict with another extension or a VS Code shortcut.
Solution: Go to File → Preferences → Keyboard Shortcuts, search for utplsql,
and reassign the keys as needed.
Symptom: the run fails with "oracledb not available" or a connection error.
Cause 1: node-oracledb is not installed (the VSIX already ships the
thin driver as a mandatory dependency; in development, run npm install).
Solution: reinstall dependencies:
npm installCause 2: Missing grants on the buffer tables (shared install).
Solution: Run as DBA:
GRANT SELECT, DELETE ON UT3.UT_OUTPUT_BUFFER_TMP TO PUBLIC;
GRANT SELECT, DELETE ON UT3.UT_OUTPUT_BUFFER_INFO_TMP TO PUBLIC;Symptom: In schema mode, all tests appear under "UNKNOWN".
Cause: The schemaPattern does not match the directory structure.
Solution: Adjust the pattern. Examples:
// Structure: src/HR/tests/ut_hr.pks
"utplsql.organization.schemaPattern": "src/{schema}/tests/**"
// Structure: db/APP/packages/ut_foo.pks
"utplsql.organization.schemaPattern": "db/{schema}/**"The {schema} placeholder captures exactly one directory level.
Use ** for any depth of subdirectories after the schema.
Database discovery (DB-first since 0.13.0): In
schemamode, when there is a configured connection (without prompt), the extension discovers suites directly from the database viaut_runner.get_suites_info(utPLSQL ≥ 3.1.3), falling back toALL_OBJECTS/ALL_SOURCEfor schemas whose.pksfiles are not in the workspace. The schemas queried are the directories under the base of theschemaPattern(e.g.,db/*) and the schemas of local suites. Suites from the database appear with virtual URIutplsql-db:/, open read-only (source fromALL_SOURCE) so jump to failure works. They have no CodeLens and no inline decorations.
The PL/SQL debugger uses DBMS_DEBUG, which requires:
- the target package compiled with debug information — Oracle strips it at
PLSQL_OPTIMIZE_LEVEL = 2(the default). Compile withALTER SESSION SET PLSQL_OPTIMIZE_LEVEL = 1before creating the package, or recompile withALTER PACKAGE <pkg> COMPILE DEBUG PLSQL_OPTIMIZE_LEVEL = 1(theutPLSQL: Compile for Debugcommand does both); -
GRANT DEBUG CONNECT SESSIONandGRANT EXECUTE ON SYS.DBMS_DEBUG— see Database requirements; - breakpoints in the test package (
test_*.pkb) may not hit — utPLSQL runs tests through dynamic SQL, so set the breakpoints in the code under test (production function/procedure/package) instead.
Also make sure utplsql.debugger.enabled is on (default). Without debug info the
breakpoints are silently ignored and the test runs to completion.
Set UTPLSQL_DEBUG=1 before launching VSCode to enable diagnostic logs in the
Extension Host console (connection, discovery and coverage failures with
context). Unset = silent. Credentials are never logged.
- Getting Started
- Usage
- Advanced Tools
- Reference
- Development
- Help