-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration examples
Copy-paste snippets for common scenarios. Every key is prefixed utplsql.; for the
full reference see Settings.
Never store passwords in
settings.json. Use theUTPLSQL_CONNenvironment variable (or connection profiles) instead — see Connection Setup.
Recommended precedence: put sourcePath and other project-specific values in the
workspace .vscode/settings.json; keep machine/credential data in user
settings or env vars.
# provide the connection out-of-band
export UTPLSQL_CONN="app/password@//localhost:1521/XEPDB1"PowerShell: $env:UTPLSQL_CONN = "app/password@//localhost:1521/XEPDB1".
// user settings.json (contains credentials — keep it out of git)
{
"utplsql.activeProfile": "dev",
"utplsql.profiles": [
{
"id": "11111111-1111-1111-1111-111111111111",
"name": "DEV Local",
"connection": "app/password@//localhost:1521/XEPDB1",
"description": "Local development",
"charset": "utf8",
"sourcePath": "src",
"isDefault": true
},
{
"id": "22222222-2222-2222-2222-222222222222",
"name": "HOMOLOG",
"connection": "app/password@//homolog:1521/APP",
"sourcePath": "src",
"coverageOwner": "APP"
}
]
}Switch at runtime with the utplsql.switchProfile command.
When .sql files are encoded as Windows-1252, set the profile charset so
runScriptFile/runScriptFolder decode them correctly:
{
"utplsql.profiles": [
{
"id": "33333333-3333-3333-3333-333333333333",
"name": "LEGACY (win1252)",
"connection": "legacy/password@//old-db:1521/LEGACY",
"charset": "win1252",
"sourcePath": "legacy/src"
}
]
}{
"utplsql.includePatterns": ["**/*.sql"]
}{
"utplsql.organization": "schema",
"utplsql.organization.schemaPattern": "db/{schema}/**"
}With a configured connection, refresh also discovers suites from the database for schemas that have no local files. See Tree Organization.
{
"utplsql.sourcePath": "src",
"utplsql.coverageOwner": "APP",
"utplsql.sqlCoverageEnabled": true
}sqlCoverageEnabled requires GRANT SELECT ON V$SQL and is best-effort. See
Code Coverage.
{
"utplsql.scriptRunner.stopOnError": true,
"utplsql.scriptRunner.autoCommit": true,
"utplsql.scriptRunner.filePattern": "**/*.{sql,pks,pkb,fnc,prc,trg}",
"utplsql.scriptRunner.dbmsOutput": false,
"utplsql.scriptRunner.timeoutSeconds": 300
}Loaded from the editor (utplsql.runScript) or by file/folder in the Explorer.
See Commands.
{
"utplsql.timeoutMinutes": 120,
"utplsql.dbmsOutput": true
}timeoutMinutes cancels the run on expiry (0/unset semantics: default 60);
dbmsOutput appends DBMS_OUTPUT captured from the test session to the run output.
Useful for screenshots or when you only care about the Test Explorer:
{
"utplsql.codeLens.enabled": false,
"utplsql.decorations.enabled": false,
"utplsql.statusBar.enabled": false
}{
"utplsql.oraclePoolMin": 2,
"utplsql.oraclePoolMax": 20,
"utplsql.oraclePoolIncrement": 2,
"utplsql.oraclePoolPingInterval": 60
}{
"utplsql.additionalReporters": ["UT_COVERAGE_HTML_REPORTER"]
}{
"utplsql.language": "pt-br"
}auto (default) follows the VSCode language. See Settings for the
full list of locales.
In a .code-workspace file, scope settings to a folder:
{
"folders": [{ "path": "project-a" }, { "path": "project-b" }],
"settings": {
"[project-a]": {
"utplsql.sourcePath": "project-a/src",
"utplsql.organization": "schema",
"utplsql.organization.schemaPattern": "project-a/db/{schema}/**"
},
"[project-b]": {
"utplsql.sourcePath": "project-b/src"
}
}
}- Settings — full reference and precedence
- Connection Setup
- Code Coverage
- Tree Organization
- Custom Reporters
- Commands
- Getting Started
- Usage
- Advanced Tools
- Reference
- Development
- Help