Skip to Main Content
  • Questions
  • SET DEFINE OFF Not Working for Partial Script Execution in VS Code Extension v25.1.0

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Estela.

Asked: September 23, 2025 - 11:33 am UTC

Last updated: September 24, 2025 - 2:49 pm UTC

Version: Oracle SQL Developer Extension for VSCode

Viewed 1000+ times

You Asked

After updating to v25.x.x of the Oracle SQL Developer extension for VS Code, I noticed that SET DEFINE OFF only works when I run the script (F5) in the first line.

In previous versions, SET DEFINE OFF worked regardless of where the script was executed.

Is this a known issue or change? Is there a way to make SET DEFINE OFF apply for partial execution?
Thanks!

and Chris said...

UPDATE: After a bit more investigation, I see the problem (thanks Connor!) We'll discuss it internally.

--

I'm unsure what you mean. Using the latest version (25.2.2) set define off seems to work fine.

Running this

set define on
define test = 'string'

select '&test';

set define off

select '&test';
select '&test';
select '&test';


In script mode (F5) or statement mode (F9 or ctrl-enter) gives the output below:

SQL> set define on
SQL> define test = 'string'
SQL> 
SQL> select '&test';

'STRIN
------
string

SQL> 
SQL> set define off
SQL> 
SQL> select '&test';

'&TES
-----
&test

SQL> select '&test';

'&TES
-----
&test

SQL> select '&test';

'&TES
-----
&test


So first step: update! If the problem persists, please give us a detailed script showing exactly what causes the issue.